Ruby - Arrays
What is the output of this Ruby code?
arr = [5, 2, 9, 1] sorted = arr.sort.reverse p sorted
arr = [5, 2, 9, 1] sorted = arr.sort.reverse p sorted
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions