Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

revert order elements inside array

const a = [1, 2, 3];

console.log(a); // [1, 2, 3]

a.reverse();

console.log(a); // [3, 2, 1]

Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #revert #order #elements #array
ADD COMMENT
Topic
Name
5+7 =