Because it's the only way to guarantee that x exits when you reach the end of the loop.

do {
  if(true) continue; //Yawn... skip.
  const x = ... ;
} while (predicate(x)); //What's x?

But the compiler could tell that there is a 'continue' before x was declared, and issue an error when it is used in while(...)

Reply via email to