Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js sort integer array

// ascending (normal)
numArray.sort((a,b) => a-b);

// decending (reverse)
numArray.sort((a,b) => b-a);
Source by practicum.yandex.com #
 
PREVIOUS NEXT
Tagged: #js #sort #integer #array
ADD COMMENT
Topic
Name
7+2 =