So I am writing this loop, and I have a random number generator in it. How come it only picks one random number for all the iterations of the loop instead of a new random number? here's my code:
for ( i = 0; i < 25; i++ ) {
var randNum = 0;
var randNum = Math.floor(Math.random() * 5);
}
this is in the chrome browser. Is there something wrong with this code?