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