While Loop

While Loop- While loop executes a statement repeatedly as long as an expression/condition is true. Once the expression/condition becomes false, the loop terminates or stop

E.g.

<html>
<head>
<title>While Loop Statement</title>
</head>
<body>
While Loop
<Br>
<Script language="JavaScript">
var a=0;
while(a<10)
{
document.write(a + "<Br>");
a++;
}
</script>
</body>
</html>
Check Output:
Do...While Loop Statement While Loop?