While-1

 
In this example, We are starting counter from 0 then the while condition limit till 10 and then add 1 using count++. See the code snippet:
 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <script> var count = 0; document.write("Starting Loop "); while (count < 10){ document.write("I am : " + count + "<br />"); count++; } document.write("Loop stopped!"); </script> </body> </html>
Output