for looop javascript code example
Example 1: loop javascript
// infinite for loop
for(let i = 1; i > 0; i++) {
// block of code
}
Example 2: javascript for loop[
for(i=0;i<=5;i++){
console.log(i);}
// infinite for loop
for(let i = 1; i > 0; i++) {
// block of code
}
for(i=0;i<=5;i++){
console.log(i);}