Logo

Programming-Idioms

History of Idiom 2 > diff from v67 to v68

Edit summary for version 68 by christianbundy:
[JS] Previous formatting was not how JS is usually written

Version 67

2019-03-26, 20:15:26

Version 68

2019-09-26, 15:05:06

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Code
for(var i=0;i<10;i++)
	console.log("Hello");
Code
for (var i = 0; i < 10; i++) {
  console.log("Hello");
}