this post was submitted on 04 Jun 2025
170 points (97.8% liked)

Programmer Humor

36439 readers
385 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
[–] propter_hog@hexbear.net 1 points 1 week ago* (last edited 1 week ago)

Precisely. This exact situation from the comic would happen in Java, too, except it complains when you subtract an int from a string. JavaScript was merely designed to minimize errors (since a web browser takes the place of the compiler, and random strangers visiting your site shouldn't get interpretation errors) so instead of throwing up it just does its best at interpreting what you meant.