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