this post was submitted on 07 Sep 2022
56 points (93.8% liked)
Programmer Humor
32443 readers
720 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
...but why? This looks like it would never be expected behavior. Like a bug in the implementation, which can simply be fixed.
Oh no, it's even documented on MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt#using_parseint
Every time I have to write code in jabbascript I think "can't be that hard" but then I stumble across some weird behavior like this and I first think "must be a bug somewhere in my code" but no. After some research it always turns out it's actually a documented "feature(?)".
I have no idea why this shitty language is so popular and the web standard.
jabbascript
Should becomes standard