Logo

Programming-Idioms

History of Idiom 2 > diff from v82 to v83

Edit summary for version 83 by gumbo59:
New JS implementation by user [gumbo59]

Version 82

2019-09-26, 20:12:51

Version 83

2019-09-26, 21:37:44

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
let count = 0
while (count < 10) {
  count++; 
  console.log('Hello');
}