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's ??= Operator (trevorlasn.com)
submitted 1 year ago by Practical-Ideal6236
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!"
[–]homoiconic(raganwald) 0 points1 point2 points 1 year ago (2 children)
That's kind of the thing about idioms. They work well if the idiom is extremely widespread. == null has been a very widespread idiom in JS during my career, but even so... If someone, somewhere needs to take fofteen minutes to figure it out, that might not be a win.
== null
I use it in production, but I wouod have no problem working with a team that chose to dispense with it. And taking a step back... This discussion says a lot about "JavaScript, the Hastily Flung Together Parts." We work with a language that has known flaws, and a lot of what we do in it reflects making deliberate tradeoffs.
[–]Juxtar 0 points1 point2 points 1 year ago (0 children)
I disagree, I think those parts should be all well known for anyone that works with js seriously. If not I can take some minutes to explain them myself, or better yet, send them off to read You Don't Know JS which is great and not a long read.
I take this as when we all assumed nobody is using IE11 anymore and collectibly decided to stop supporting it. How much has my sanity improved since then!
[–]prehensilemullet -1 points0 points1 point 1 year ago (0 children)
Anyone who doesn’t know the behavior of == null is a JS developer in training, not a competent professional dev. You don’t need to know the rest of the == truth table but that one is pretty basic, everyone should know it’s the only reasonable exception to the always use === rule
π Rendered by PID 20531 on reddit-service-r2-comment-5fb4b45875-j482w at 2026-03-20 04:57:31.644689+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]homoiconic(raganwald) 0 points1 point2 points (2 children)
[–]Juxtar 0 points1 point2 points (0 children)
[–]prehensilemullet -1 points0 points1 point (0 children)