do ... while loop

suggest change
var availableName;
do {
    availableName = getRandomName();
} while (isNameUsed(name));

A do while loop is guaranteed to run at least once as it’s condition is only checked at the end of an iteration. A traditional while loop may run zero or more times as its condition is checked at the beginning of an iteration.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents