Loading files
/**
* Compare function for sorting arrays of numbers.
*
* @param {number} a - first number
* @param {number} b - second number
* @return {number} result of a - b
*
* @alias module:array-utils.fnNumberSort
* @function
*
* @example
* const numbers = [2, 1, 4, 3, 6, 5, 8, 7, 9, 0]
* const sorted = numbers.sort(fnNumberSort) // returns [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
*/
export const fnNumberSort = (a, b) => a - b
d037b79dcThis file is pinned to the selected release. Download the original to open it in your design tool.