JS Built-ins
TypedArrayreversebeginner

TypedArray.prototype.reverse()

πŸ“– Usage Example
const arr = new Int32Array([1, 2, 3]);
arr.reverse();
// Int32Array [3, 2, 1]

reverse() reverses the typed array in place and returns it.

Use reverse() to reverse the elements of a TypedArray in place.

πŸ’‘ Hints (1)
  • β€’ reverse() mutates and returns the array