Reverse Array Elements
ARRAY

Adventure Scenario

Given an array of integers array, return a new array containing the elements of array in reverse order.

Examples

reverseArray([1, 2, 3, 4, 5]) // [5, 4, 3, 2, 1] reverseArray([0, 5, 8, 12]) // [12, 8, 5, 0] reverseArray([-10, -3, 2, 0, 4]) // [4, 0, 2, -3, -10]
Loading...