Hey Shantanu Borgohain, Thanks so much for reading and responding. That’s a fantastic catch, it shows me that I have a cognitive bias about how it “should” work in JavaScript. You’re exactly right, and I’ve fixed it: the comparison function returns a negative value if the second item is bigger, or a positive value if the second item is smaller. Of course, it’s just basic arithmetic: a-b
.
Thanks again, I really truly appreciate it.
PS You have a fantastic name! I love it! Have a great one 🤩