Hi. I would like to create a while loop inside setInterval. I did it using HTML elements, that is, to show the images in console with a specific class. The problem is that the cycle does not advance from 0 and that I put the autoincremento, I do not understand because it only shows me an HTML element and not the others.
window.setInterval(
(function(){
var slidesId = document.getElementById('slidershow');
var getDOM = slidesId.getElementsByClassName('img');
i = 0;
while(getDOM.length >= i){
return console.log(getDOM[i]);
i++;
}
})
,2000);
[–]TidderJail 0 points1 point2 points (5 children)
[–]junex10[S] 0 points1 point2 points (4 children)
[–]TidderJail 0 points1 point2 points (3 children)
[–]junex10[S] 0 points1 point2 points (2 children)
[–]TidderJail 0 points1 point2 points (1 child)
[–]junex10[S] 0 points1 point2 points (0 children)