Ruby N -й элемент массива
# Ruby program to demonstrate the
# accessing the elements of the array
# creating string using []
str = ["GFG", "G4G", "Sudo", "Geeks"]
# accessing array elements
# using index
puts str[1]
# using the negative index
puts str[-1]
Defiant Dove