Sorting in JavaScript (Why It Confuses Everyone at First 😅)
If you’re learning JavaScript, there’s a high chance you’ve tried this:
[10, 2, 5].sort();
And expected:
[2, 5, 10]
But instead, you got:
[10, 2, 5]
At this point, most people think: “Is JavaScript
vibha07.hashnode.dev3 min read