for i in 3 javascript code example
Example 1: js for
for (let step = 0; step < 5; step++) {
// Runs 5 times, with values of step 0 through 4.
console.log(step);
}
0
1
2
3
4
Example 2: for in loops javascript
for(const key in object){
// do stuff
}
// goes through the keys of an object