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