Ruby - Arrays
Which method or syntax in Ruby returns the first element of an array
arr?arr?.first.first method returns the first element of an array in Ruby.arr[1] returns the second element (indexing starts at 0), arr.last and arr[-1] return the last element.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions