Ruby - Arrays
What is the output of the following Ruby code?
arr = [10, 20, 30, 40, 50] slice = arr[1..3] puts slice.inspect
arr = [10, 20, 30, 40, 50] slice = arr[1..3] puts slice.inspect
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions