Category: JavaScript

Array.sort

refactored es6 style: I would avoid Wes Bos minimized solution below as it doesn’t return 0 on duplicates which result in unstable sorting when having duplicates in the array.