433
JavaScript always know my truest of desires
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Array.prototype.sort
if no callback is passed to it will coerce non-undefined
elements to strings when sorting. It does do that.To sort numbers passing a function like
(a, b) => a - b
is good enough.Fuck JS is stupid.
Source: use JS regularly