for loop in js

the program gives a demo of the for loop in javascript
the while loop in js

the program gives a demo of the while loop in javascript