For loop is almost the same as while loop but it's much simpler.
Earlier, we had tried printing 'I Love WebLaunch!' for 100 times using while loop, now, let's try using for loop to do the same thing!
for (let count = 1; count <=100; count ++){
console.log('I love WebLaunch!');
}ℹ️ Initiate
countto 1 and then set the condition tocount <=100, meaning the loop will iterate as long as the count is less than or equal to 100.count ++means the count will increase after each iteration.
In for loop, we initiate the counter, count condition and count increment in the parenthesis ( )after for .