And i dont know how to finish it because is asking me to return [5,4,3,2,1,0] .instead of [ 0, 1, 2, 3, 4 ] as the guy who answers the challenge does in watch a video.
Im stucked and dont know how to do this, can any one help me?
Your code so far
js
'var myArray = [];
var i = 0;
while(i < 5) {
myArray.push(i);
i++;
}
console.log(myArray);'
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36.
it also collapses when im trying to write new code even thoug is not the real answer im just trying some opitions but every time i try something new the page collpases, i think theres a bug in this challenge
If the page is crashing while you are working on it you are probably creating an infinite loop. Always be very cautious about using a while loop because it is much easier to write an infinite loop. Consider using a for loop instead.