210
parseInt(5) (lemmy.ml)
you are viewing a single comment's thread
view the rest of the comments
[-] FMT99@lemmy.world 40 points 4 hours ago

Another classic javascript wat

[-] victorz@lemmy.world 3 points 3 hours ago

Classic people who don't know how to code wat. Passing a number in place of a string argument because they don't know what they're doing.

[-] jjjalljs@ttrpg.network 18 points 2 hours ago

Javascript could throw an error to alert you that the input is supposed to be a string, like most languages would do.

[-] heavy@sh.itjust.works -1 points 1 hour ago

Theoretically, Javascript is an untyped language, so there aren't supposed to really be static types. Giving type errors in this situation would be against design.

[-] jjjalljs@ttrpg.network 12 points 1 hour ago

Maybe the design is bad, then.

[-] heavy@sh.itjust.works 3 points 1 hour ago

Lol you'll get no argument from me. It's not my favorite language.

load more comments (5 replies)
load more comments (5 replies)
this post was submitted on 05 May 2025
210 points (99.5% liked)

Programmer Humor

22995 readers
882 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 2 years ago
MODERATORS