JS - Loops and Higher Order function
loops are helpful when we want to execute the same code a lot of times.
for loop
Here below is a example of printing 1 to 10
for(let i = 1; i <= 5; i++){
console.log(i)
}
Output
1
2
3
4
5
Pointe
javascriptfromscratch.hashnode.dev11 min read