JavaScript Array reverse() Method
The Array.reverse() method is a built-in JavaScript function that reverses the order of elements in an array. It modifies the original array so that the first element becomes the last, the second element becomes the second-to-last, and so on. Syntax Parameters The reverse() method does not take any parameters. Return Value The reverse() method returns…