Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort js

numArray.sort((a, b) => a - b); // For ascending sort
numArray.sort((a, b) => b - a); // For descending sort
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #js
ADD COMMENT
Topic
Name
9+9 =