Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse array elements in javascript

// reverse array elements in javascript
const arr = ["first", "second", "third"];
arr.reverse(); // Mutates the array
console.log(arr); // ["third", "second", "first"]
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #reverse #array #elements #javascript
ADD COMMENT
Topic
Name
3+6 =