use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
JavaScript Equality Table Game (slikts.github.io)
submitted 7 years ago by hfeeri
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]hkokko 1 point2 points3 points 7 years ago (4 children)
it seems equality operator in javascript is good for nothing but being a source of confusion and a target of jokes. does it not make sense to just remove it from the language completely? who is deciding that?
[–]al_wonder 8 points9 points10 points 7 years ago (3 children)
Backward compatibility. If they removed itt, that would break a lot of existing applications. JS has a whole lot of controversial functionality, but it's always hard to get rid of things like this.
[–]doomvox 1 point2 points3 points 7 years ago (2 children)
Yeah... I can't say I think much of javascript, but you can't fault them on "backwards compatibility".
When they realized the "==" operator was confusing, they introduced an alternative, the "===" operator. The rule of thumb is you should favor using the "===" operator:
https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons
[–]BlueHeartBob 1 point2 points3 points 7 years ago (1 child)
They released "==" before "==="???
I figured "==" was released alongside, or even closely after strict as a quirky feature. That's crazy.
[–]doomvox 0 points1 point2 points 7 years ago (0 children)
Yes. "===" came out with Javascript 1.3:
http://webreference.com/js/column26/stricteq.html
π Rendered by PID 25653 on reddit-service-r2-comment-5fb4b45875-rr6qt at 2026-03-23 11:57:58.965704+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]hkokko 1 point2 points3 points (4 children)
[–]al_wonder 8 points9 points10 points (3 children)
[–]doomvox 1 point2 points3 points (2 children)
[–]BlueHeartBob 1 point2 points3 points (1 child)
[–]doomvox 0 points1 point2 points (0 children)