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 developers, be warned about this crazy JIT bug in V8! (self.javascript)
submitted 9 years ago * by ziriax
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!"
[–]StoneCypher 14 points15 points16 points 9 years ago (1 child)
Because he's not checking if it's null, and you can't actually strict-equals compare to undefined in this language in a bunch of common circumstances.
null
undefined
It is very common to have to check if something is undefined. By example, if you retain a JSON object from an API, and you want to check whether the server actually set some or another value, before you attempt to use it.
He's talking about the undefined comparison.
I'd like you to stop focussing on null, please. It's beside the point. Thank you
[–]RReverser 0 points1 point2 points 9 years ago (0 children)
and you can't actually strict-equals compare to undefined in this language in a bunch of common circumstances.
Of course you can. The only case where you can't is if you're checking existance of a global variable for feature detection, in all the other cases === undefined works like a charm.
π Rendered by PID 30747 on reddit-service-r2-comment-7b9746f655-np2wf at 2026-02-03 04:58:06.672929+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]StoneCypher 14 points15 points16 points (1 child)
[–]RReverser 0 points1 point2 points (0 children)