This loop keeps crashing my computer

Tell us what’s happening:
every time i write this code my browser crashes. and all the solutions are wrong… Here is the challenge:

The first type of loop we will learn is called a while loop because it runs “while” a specified condition is true and stops once that condition is no longer true.
var ourArray = ;
var i = 0;
while(i < 5) {
ourArray.push(i);
i++;
}
``
In the code example above, the while loop will execute 5 times and append the numbers 0 through 4 to ourArray .

Let’s try getting a while loop to work by pushing values to an array.

Add the numbers 5 through 0 (inclusive) in descending order to myArray using a while loop.

All the solutions have an answer going [0,1,2,3,4,] <----thats “ascending” right?
descending would be [5, 4, 3, 2, 1, 0]

Your code so far

var myArray = [];
var i = 5;
while ( 0 < i < = 5) {
myArray. push(i);
i++;
        
```js

// Setup
var myArray = [];

// Only change code below this line.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.

Challenge: Iterate with JavaScript While Loops

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops

Hi Andrew, welcome to the forum!

There are 2 main problems here.
The first is the condition of the while. If you want to use more than one condition, you should use the logical operator AND (&& or &, depends which one suits you better).
while(i>0 && i<=5)
The second is that you put a space between myArray and it’s push method.

Also note that you are iterating inside the while only once.
You are starting with i=5, you enter in the while, you increase the value and it becomes 6, you check again the condition (which fails this time) and you exit the while.