I'm trying to make this loop work in order to get the multiples of 5 that are below 1000 in an array (yeah, just getting started with euler), but it keeps crashing my console:
var multiploCincoArray = [];
for(i = 1, r = i * 5; r < 1000; i++) {
multiploCincoArray.push(r);
}
console.log(multiploCincoArray);
I know there's something wrong with the stopping condition but i can't seem to find it.
I know i can do this too:
var multiploCincoArray = [];
for(i = 1; i <= 199 ; i++) {
multiploCincoArray.push(5 * i);
}
console.log(multiploCincoArray);
but i want to follow the path shown in the first script (if possible)...