It’d be nice to have a built-in way for comparing numbers, e.g. when sorting arrays.
```js // Compact ECMAScript 6 solution // Risk: number overflow [1, 5, 3, 12, 2].sort((a,b) => a-b) // Proposed new function: [1, 5, 3, 12, 2].sort(Number.compare) ``` -- Dr. Axel Rauschmayer [email protected] rauschma.de
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

