Ruby - Arrays
What will be the output of the following Ruby code?
arr = Array.new(3, Hash.new) arr[0][:key] = 'value' puts arr.inspect
arr = Array.new(3, Hash.new) arr[0][:key] = 'value' puts arr.inspect
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions