js how to use forloop code example
Example 1: forloop in js
for(i = 0; i < x; ++i){
//Loop, x can be replaced with any integer;
}
Example 2: how to do a for loop in js
for (let i = 0; i < 10; i++) {
console.log(i);
}
for(i = 0; i < x; ++i){
//Loop, x can be replaced with any integer;
}
for (let i = 0; i < 10; i++) {
console.log(i);
}