personally, I think there is nothing wrong with the code, and there is no error in the console, but the effect cannot be displayed. I would appreciate it if you can help me with the answer.
var aLi=document.querySelectorAll("li");
// li
var aName=[];
// li
for(var item of aLi){
// for of:item
// console.log(item);
aName.push(item.classList[0]);
//
// console.log(aName);
}
// :
function nextPic(){
aName.unshift(aName[5]);
//
aName.pop();//
for(var i=0,len=aLi.length;i<len;iPP){
//
// aLi.classList[0]=aName[i];
aLi[i].setAttribute("class",aName[i]);
}
}