Push the numbers 0 through 4 to myArray using a while loop

Push the numbers 0 through 4 to myArray using a while loop
0

#1

This the setup

// Setup
var myArray = [];

// Only change code below this line.
the line below is what they want me to do
You should be using a while loop for this.
myArray should equal [0,1,2,3,4].
This is how i coded
// Setup
var myArray = [];

// Only change code below this line.
var i =0;
while(1 < 5){
myArray.push(i);
i++;
}
but it wrong so what exactly should i code this


#2

Code is wrong… While i < 5