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

HomeMenu