This is wrong. You are directly creating an array with the elements 0 to 4.
Your while loop doesn’t run, because the condition myArray <= 5 is false.
You are using a varibale i inside your loop that was never declared.
You could either declare a counter, like let i = 0, then use the counter value as a way to run the loops. Maybe while (i < 5) { do something; i++; }.
Or you could use the array.length property to run the loop. while (myArray.length < 5) myArray.push(myArray.length);