Tell us what’s happening:
Describe your issue in detail here.
I’ve searched for help through hints and through the video and the loop didnt return correctly. Please assist me in this problem
Your code so far
var i = 0;
while (i < 5)
{i++;
myArray.push(i);}
console.log(myArray);
// Setup
var myArray = [];
// Only change code below this line
var i = 0;
while (i < 5){
i++;
myArray.push(i);
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.55
Challenge: Iterate with JavaScript While Loops
Link to the challenge: