Learn
The Zen of Ruby
'For' Shame!
All right! Last one: let’s do something about the decidedly un-Ruby for
loop in the editor.
10.times do puts "Knock knock." puts "Who's there?" end
Instructions
1.
Let’s finish up by refactoring the for
loop on the right to use .times
instead.