while loop in Javascript

 while loop in Javascript

In this article we are goanna to see about  while loop in Javascript and where we use these. which is most important when you are going to start your career in JavaScript. Please read and enjoy this article if you want to give any feedback about your experience, we welcome.



The while loop execute code till then until it get false.

Syntax:

while(condition){

block of loop statements;

increment/decrement;

}

Ex:

var i= 0;

while(i<3){

document.write(i + “<br>”);

i++;

}


Share:

0 comments

Please leave your comments...... Thanks