
array.reverse() – Reverses an array **in place** and returns the reference to the same array.
๐ Syntax
array.reverse();
๐งช Example
const arr=[1,2,3]; arr.reverse(); // [3,2,1]
array.reverse() – Reverses an array **in place** and returns the reference to the same array.
array.reverse();
const arr=[1,2,3]; arr.reverse(); // [3,2,1]
Comments
Post a Comment