1 /** Used for built-in method references. */
2 var arrayProto = Array.prototype;
4 /* Built-in method references for those with the same name as other `lodash` methods. */
5 var nativeReverse = arrayProto.reverse;
8 * Reverses `array` so that the first element becomes the last, the second
9 * element becomes the second to last, and so on.
11 * **Note:** This method mutates `array` and is based on
12 * [`Array#reverse`](https://mdn.io/Array/reverse).
18 * @param {Array} array The array to modify.
19 * @returns {Array} Returns `array`.
22 * var array = [1, 2, 3];
30 function reverse(array) {
31 return array == null ? array : nativeReverse.call(array);
34 module.exports = reverse;