1.

What is while loop?

Answer»

In Java Script while loop is another most basic loop. The purpose of a while loop is to execute a statement /block of statement repeatedly as long as an expression is true.
The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.

The syntax is:

while (condition)

{

body of the loop

}



Discussion

No Comment Found