Ruby - Hashes
What is the output of the following Ruby code?
arr = [5, 10, 15] arr[0] = 20 puts arr.inspect
arr = [5, 10, 15] arr[0] = 20 puts arr.inspect
arr[0] = 20 changes the first element from 5 to 20.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions