Below construct demonstrates usage of while loop in JavaScript:
var myNum = 3;
while(myNum < 7){
console.log("myNum =="+myNum);
myNum++;
}
Try it out at: http://jsbin.com
var myNum = 3;
while(myNum < 7){
console.log("myNum =="+myNum);
myNum++;
}
Try it out at: http://jsbin.com
No comments:
Post a Comment