The reverse()
method modifies the
original array
and
returns the array with the elements
in reverse order.
Syntax:
As we can see from the above code,
not just the reversedNumbers
array but also the original
numbers
array is now reversed
with values:
[5, 4, 3, 2, 1]