mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-12 09:44:24 +02:00
Fix typo
This commit is contained in:
@@ -285,7 +285,7 @@ hash.each do |key, value|
|
|||||||
puts "#{key} is #{value}"
|
puts "#{key} is #{value}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# If you still need and index you can use "each_with_index" and define an index
|
# If you still need an index you can use "each_with_index" and define an index
|
||||||
# variable
|
# variable
|
||||||
array.each_with_index do |element, index|
|
array.each_with_index do |element, index|
|
||||||
puts "#{element} is number #{index} in the array"
|
puts "#{element} is number #{index} in the array"
|
||||||
|
Reference in New Issue
Block a user