RosettaCodeData/Task/Apply-a-callback-to-an-array/Ruby/apply-a-callback-to-an-arra...

4 lines
41 B
Ruby

for i in [1,2,3,4,5] do
puts i**2
end