Tell us what’s happening:
var i = 0;
while(i < 6) {
myArray.push(i);
i++;
}
console.log(myArray)
Your code so far
// Setup
var myArray = [];
// Only change code below this line
var i = 0;
while(i < 6) {
myArray.push(i);
i++;
}
console.log(myArray)
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS armv7l 13020.87.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36
.
Challenge: Iterate with JavaScript While Loops
Link to the challenge: