Answers for "ruby do array i"

2

ruby iterate over array

# For Ruby
arr = ['a', 'b', 'c']

arr.each do |item|
  puts item
end
Posted by: Guest on January-11-2020
1

iterate over array ruby

# For Ruby
arr = ['a', 'b', 'c']

arr.each { |item| puts item }
Posted by: Guest on January-11-2020
4

ruby array

ary = [1, "two", 3.0] #=> [1, "two", 3.0]
Posted by: Guest on May-11-2020

Browse Popular Code Answers by Language