*Tell us what’s happening:
Here´s the challenge: Add the numbers 5 through 0 (inclusive) in descending order to myArray
using a while
loop.
And here´s my solution:
// Configuração
const myArray = ;
// Altere apenas o código abaixo desta linha
let i = 5;
while(i > 0){
myArray.push(i);
i–;
}
**Your code so far**
// Configuração
const myArray = [];
// Altere apenas o código abaixo desta linha
let i = 5;
while(i > 0){
myArray.push(i);
i--;
}
What am I doing wrong?
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Challenge: Iterate with JavaScript While Loops
Link to the challenge: