How to Sort Your Socks Using JavaScript
Get your Computer Science hat on and explore sorting algorithms currently implemented by JS engines. Learning how they work, will help you create more performant and consistent applications!
Claudia Hernández at JSNation 2018
No matter your experience in JS, you have probably came across the Array#sort method at some point. Do you remember the first time you tried sorting numbers? You were probably astonished that the sort method does not sort things out quite as we might expect. Believe it or not, there is actually much more going on than meets the eye! Let’s get our computer science hat on and explore some useful sorting algorithms currently implemented by JS engines used by Node such as Chrome's V8 and Microsoft's Chakra. As a developer, learning how these algorithms work, why and when to use them will help you create more performant and consistent applications!