Found mistake in a challenge

The challenge is this one:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops
I think this line:

It is called a do...while loop because it will first do one pass of the code inside the loop no matter what, and then continue to run the loop while the specified condition evaluates to true .

should be:

It is called a do...while loop because it will first do one pass of the code inside the loop no matter what, and then continue to run the loop while the specified condition evaluates to false .

From, webmaster_project (instagram and twitter too)

The curriculum is correct. A while loop executes while the condition provided is true.

A few months of coding later, I still think my request is right :smiley: (sorry for necrobumping). While the condition is true - it iterates and “loops”.
while (condition) {
//condition = true - iterating.
//condition = false - stops iterating.
}
But when the condition eventually evalueates to false, it stops iterating. Right? It won’t stop the loop when it evaluates to true.

The loop runs while the condition is true. The loop stops if the condition is false. So the quote from the challenge is correct, and your new statement is also correct.

I misunderstood the sentence because of my poor English, sorry. The FreeCodeCamp sentence is completely correct!

No problem at all. Asking questions means you’re trying to learn!

1 Like