210
parseInt(5)
(lemmy.ml)
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.
Another classic javascript wat
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.
Javascript could throw an error to alert you that the input is supposed to be a string, like most languages would do.
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.
Maybe the design is bad, then.
Lol you'll get no argument from me. It's not my favorite language.