this post was submitted on 20 Dec 2024
953 points (96.8% liked)

Programmer Humor

32720 readers
374 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 3 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 3 days ago (1 children)

WTF is it casting it to string or something?

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

You can bet your pants it does!

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

This 💩 is 🍌s
baNaNas