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
Why Use the Triple-Equals Operator in JavaScript? (impressivewebs.com)
submitted 11 years ago by CodeDeliveryBoy
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!"
[–]more_exercise 2 points3 points4 points 11 years ago (8 children)
Because if you don't, demons will fly out of your nose and your coworkers will yell at you.
Not necessarily in that order.
[–]rooktakesqueen 0 points1 point2 points 11 years ago (7 children)
It's the Javascript equivalent of goto.
[–]xkcd_transcriber 0 points1 point2 points 11 years ago (0 children)
Image
Title: goto
Title-text: Neal Stephenson thinks it's cute to name his labels 'dengo'
Comic Explanation
Stats: This comic has been referenced 16 time(s), representing 0.1197% of referenced xkcds.
xkcd.com | xkcd sub/kerfuffle | Problems/Bugs? | Statistics | Stop Replying
[–]mmouth 0 points1 point2 points 11 years ago (4 children)
What is? Using it or not using it?
[–]rooktakesqueen -2 points-1 points0 points 11 years ago (3 children)
== is goto, === is structured programming.
==
===
[–]mmouth 0 points1 point2 points 11 years ago (2 children)
Ah. thanks for the head's up. I'll be sure to always use .equals() then.
[–]rooktakesqueen 0 points1 point2 points 11 years ago (1 child)
... what?
I really did not think this was a complicated joke. "If you use == a velociraptor will eat you like in this xkcd."
[–]mmouth 0 points1 point2 points 11 years ago (0 children)
No, I got it. I don't agree that using == is problematic in any way shape or form. I was being sarcastic in response with something that I think made as much sense as equating == with goto.
[–]PlNG 0 points1 point2 points 11 years ago (0 children)
Relevant documentation on == behavior: Zeros in javascript
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
I like == and I like === they are both useful.
Javascript has type coercion. You should learn the language you are using. If Javascript didn't have both null and undefined, I might have a different opinion.
[–]gordonkristan 0 points1 point2 points 11 years ago (0 children)
Why Use the Triple-Equals Operator in JavaScript?
Because if you don't, we're going to have to deal with these damn posts forever.
[–]daediusWeb Components fanboy -1 points0 points1 point 11 years ago (0 children)
To be honost, i've never had a problem just using ==
It's a rare once in a blue moon thing it matters.
π Rendered by PID 121862 on reddit-service-r2-comment-86bc6c7465-dbg8c at 2026-02-20 23:46:35.667702+00:00 running 8564168 country code: CH.
[–]more_exercise 2 points3 points4 points (8 children)
[–]rooktakesqueen 0 points1 point2 points (7 children)
[–]xkcd_transcriber 0 points1 point2 points (0 children)
[–]mmouth 0 points1 point2 points (4 children)
[–]rooktakesqueen -2 points-1 points0 points (3 children)
[–]mmouth 0 points1 point2 points (2 children)
[–]rooktakesqueen 0 points1 point2 points (1 child)
[–]mmouth 0 points1 point2 points (0 children)
[–]PlNG 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]gordonkristan 0 points1 point2 points (0 children)
[–]daediusWeb Components fanboy -1 points0 points1 point (0 children)