anish000kumar
11/8/2018 - 1:51 PM

Sort array of numbers

Sort array of numbers

numArray.sort((a, d) => a - d); // For ascending sort 
numArray.sort((a, d) => d - a); // For descending sort