JavaScript: Array.prototype.reverse

By Xah Lee. Date: . Last updated: .
arrayX.reverse()
Reverse the order of elements of array. Return the modified array. The original is changed.
const hh = [3,4,5];

console.log( hh.reverse () ); // [ 5, 4, 3 ]

// original is changed
console.log( hh ); // [ 5, 4, 3 ]
JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Array

prototype