Ruby - Arrays
Which of the following is the correct syntax to get elements from index 2 up to but not including index 5 in Ruby array
arr?arr?... excludes the end index, so 2...5 means indexes 2, 3, and 4.arr[2...5] uses valid Ruby syntax for slicing excluding the end index.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions