while

The while JS Iterations iterates a loop while the condition is true.

It is similar to a for statement but has different syntax.

Syntax

while(condition)
{
    code
}

Examples

do-while

for

for-await-of

for-in

for-of

European Computer Manufacturers Association (ECMA)

Home Menu