Declared Variable Greater than Do While Conditional (5)

Tell us what’s happening:
RESOLVED

  **Your code so far**

// Setup
const myArray = [];
let i = 10;

// Only change code below this line
while (i < 5) {
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/97.0.4692.99 Safari/537.36

Challenge: Iterate with JavaScript Do…While Loops

Link to the challenge:

A do…while always executes at least once. The condition is checked after each loop iteration instead of before like with a while loop.

Yes, i figured that out after I posted this… that was the whole point. HAHAHA. Now I’m trying to figure out how to delete this post.

No worries, I’m sure someone else will have this same question in the future. Do…while loops are pretty uncommon.