0

anyone can explain why this happened

I'm making background slide automatically when I console it with console.log () why the result is only 0 and 1 why please explain to me because I confused why it can happen https://code.sololearn.com/WhjrhP529azN/?ref=app

11th Jun 2018, 1:23 AM
Hafizd Jubaidir
Hafizd Jubaidir - avatar
1 Antwort
+ 4
setInterval(function(){ if(current >= allimages.length-1){ current = 0; console.log(current) }else{ console.log(++current) };
11th Jun 2018, 1:29 AM
Hatsy Rei
Hatsy Rei - avatar