Ruby - Basics and Runtime
What will this Ruby code print?
array = [1, 2, 3]
result = array.map { |n| n * 2 }
puts result.inspectarray = [1, 2, 3]
result = array.map { |n| n * 2 }
puts result.inspect15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions