JavaScript's Array.sort defaults to a String sort. This catches many people off guard when attempting to sort an Array of type Number.
When we want something other than a String sort, we have to be explicit and pass a compare function into the sort method.
Article: https://joel.net/custom-array-sort-al...
Subcribe to my Newsletter: https://joel.net/newsletter
On this page of the site you can watch the video online Custom Array Sort Algorithms in JavaScript with a duration of hours minute second in good quality, which was uploaded by the user Joel Codes 22 October 2020, share the link with friends and acquaintances, this video has already been watched 2,990 times on youtube and it was liked by 92 viewers. Enjoy your viewing!