Programming-Idioms

History of Idiom 2 > diff from v49 to v50

Edit summary for version 50 :
[Ruby] one line version

Version 49

2016-09-22, 12:14:16

Version 50

2016-09-27, 14:42:12

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
10.times do
  p "Hello"
end
Code
10.times { p 'Hello' }