while Loop

Keeps repeating as long as its condition stays true.

What is while Loop in JavaScript?

while Loop — Keeps repeating as long as its condition stays true.

let attempts = 0;

while (attempts < 3) {
    attempts++;
}

Level: Apprentice · More JavaScript terms at this level

Updated

In other subjects