Tell us what’s happening:
Describe your issue in detail here.
Challenge asks for the sequence in descending order hence why I started at 6 and took away 1 until ‘i’ was less than 0 Your code so far
// Setup
const myArray = [];
// Only change code below this line
let i = 6;
while (i < 0) {
myArray.push(i);
i--;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Iterate with JavaScript While Loops
1st one tells the computer that i should be set to an initial value of 6. We agree so far.
2nd line starts a while loop.
The while only runs if the condition in the brackets is true. So what does the condition in the bracket evaluate to when i is set to 6?