Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 167 Bytes

use_times.md

File metadata and controls

15 lines (13 loc) · 167 Bytes

Use Fixnum#times

Rather than

for i in 1..10
  puts "My iteration #{i}"
end

Use

10.times do |i|
  puts "My iteration #{i + 1}"
end