1 line of code: How to sort an array by descending order
const sortDesc = arr =&gt;  [...arr].sort((a, b) =&gt; a - b).reverse();        Enter fullscreen...
Tags: javascript, webdev, performance, codequality