Complete the code to sort the array in ascending order.
numbers = [5, 3, 8, 1] sorted_numbers = numbers.[1]
The sort method arranges the elements of the array in ascending order.
Complete the code to reverse the order of elements in the array.
letters = ['a', 'b', 'c', 'd'] reversed_letters = letters.[1]
The reverse method flips the order of elements in the array.
Fix the error in the code to sort the array in descending order.
scores = [10, 40, 30, 20] desc_scores = scores.sort.[1]
To sort in descending order, first sort ascending, then reverse the array.
Fill both blanks to create a new array with sorted elements and then reversed.
data = [7, 2, 9, 4] result = data.[1].[2]
First, sort arranges the array ascending, then reverse flips it to descending.
Fill all three blanks to sort the array, reverse it, and then get the first element.
values = [15, 3, 9, 7] first = values.[1].[2].[3]
We sort ascending, reverse to descending, then get the first element which is the largest.
