I wanna move my button to bottom with a couple of codes here :
var y = [];
for(var i = 0;i < 8;i++){
y[i] = 0;
interval[i] = setInterval(function(){
y[i]++;
if(parseInt(y[i]) >= window.innerHeight){
clearInterval(this);
}
console.log(y[i]);
thisbutton.style.top = y[i] + "px";
},10);
}
My problem is that y[i] is NaN.
Can you tell me why?
thanks