275
you are viewing a single comment's thread
view the rest of the comments
[-] treadful@lemmy.zip 5 points 13 hours ago

You talk like error handling isn't a thing.

[-] anewfox@lemmy.zip 3 points 13 hours ago* (last edited 13 hours ago)

fun fact: getting NaN from a numeric calculation is the error that you handle. if this wasn't obvious, please don't write code for anyone but yourself. hope this helps.

[-] daychilde@lemmy.world 5 points 10 hours ago

if this wasn’t obvious,

If this wasn't obvious, be glad of the chance to learn.

If we all stopped as soon as something simple wasn't obvious, nobody would learn and nobody would do anything.

What a terrible reply to someone. It cuts off curiosity and says "You are too stupid to do anything."

Yet I bet there was a time that even with that very specific thing, you didn't think of it that way.

[-] treadful@lemmy.zip -2 points 12 hours ago

NaN is a primitive value, not an Error.

>> typeof 1 / "a"
"number" 
[-] lemonsorrel@lemmy.world 0 points 12 hours ago

newcomers to shitting on javascript sometimes learn to blame the tool

this post was submitted on 14 Nov 2026
275 points (98.2% liked)

Programmer Humor

34135 readers
1937 users here now

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.

Rules

founded 3 years ago
MODERATORS