1/26/2021
•
EN
array.sort() Does Not Simply Sort Numbers in JavaScript
Explains why JavaScript's array.sort() doesn't sort numbers numerically by default and how to fix it using a comparator function.