this post was submitted on 20 Dec 2024
971 points (97.0% liked)

Programmer Humor

32733 readers
593 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Black616Angel@discuss.tchncs.de 7 points 6 days ago (1 children)

I learned today, that in JavaScript

[2,-2,6,-7].sort()

results in[-2,-7,2,6]

[–] zqwzzle@lemmy.ca 4 points 6 days ago (1 children)

WTF is it casting it to string or something?

[–] Black616Angel@discuss.tchncs.de 4 points 6 days ago (1 children)

You can bet your pants it does!

[–] zqwzzle@lemmy.ca 7 points 6 days ago (1 children)
[–] davel@lemmy.ml 3 points 5 days ago

This 💩 is 🍌s
baNaNas