Programming-Idioms

History of Idiom 2 > diff from v14 to v15

Edit summary for version 15 :

Version 14

2015-09-05, 16:23:16

Version 15

2015-09-05, 16:24:22

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Code
10.times do
  p "Hello World"
end
Code
10.times do
  p "Hello"
end