Ruby chaque méthode DO
array.each do |item|
puts "The current array item is: #{item}"
end
Prickly Petrel
array.each do |item|
puts "The current array item is: #{item}"
end
numbers = [1,2,4,9,12]
numbers.each do |n|
break if n > 10
puts n
end
3.times do
|i|
puts("Inside the loop i = #{i}" )
end