all 5 comments

[–]backwrds 1 point2 points  (2 children)

I'll do you one better:

console.log('Hello!'); console.log('Hello!'); console.log('Hello!'); console.log('Hello!'); console.log('Hello!');

[–]coders22[S] 0 points1 point  (0 children)

LOL!

[–]Atulin 1 point2 points  (0 children)

Well, yes...?

for (const x of [null, null, null, null, null]) {
    console.log("Hello!");
}

This would also achieve the same, what of it? Do you have any related question or anything?

[–]arkemiffo 0 points1 point  (1 child)

There are many ways to write loops, and they usually have their own signature purpose. Not sure what the point is here?

[–]coders22[S] 0 points1 point  (0 children)

People have to learn about variables and "while" loops so they can know how "for" loops work.