“As much as I’d love our code to be fully compliant with the great programming practices of this world, I’d rather have it working — if possible before the heat death of the Universe.”
Please mind that when using Array.prototype.sort without argument, the sorting is done via Unicode endpoints – pretty much an alphabetical sort, which means that this array:
[1,8,11,10]
will be sorted into this one:
[1,10,11,8]
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can also make use of ES6 to merge any number of lists in a single call:
Please mind that when using
Array.prototype.sort
without argument, the sorting is done via Unicode endpoints – pretty much an alphabetical sort, which means that this array:will be sorted into this one: