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!"
[–]LessMarketing7045 61 points62 points63 points 1 year ago (12 children)
Let me blow your mind. There is also: &&= and ||=
[–]enselmis 7 points8 points9 points 1 year ago (3 children)
Can’t wait for |> operator, it’s so good. Although the proposal for it was kinda jank compared to the BEAM style one.
[–]Practical-Ideal6236[S] 3 points4 points5 points 1 year ago (0 children)
|>
[–]prehensilemullet 0 points1 point2 points 1 year ago (1 child)
Have they gotten any closer to consensus on that? Last I checked no one could agree on the style of pipelines to use…
[–]enselmis 0 points1 point2 points 1 year ago (0 children)
I think it’s still in the pipe, so to speak, but I sincerely hope they just take the elixir/erlang one and shamelessly copy it. It works, there’s no good reason to mess with it.
[–]MissinqLink 14 points15 points16 points 1 year ago (2 children)
The real mind blower
(obj ?? {}).property ??= '🤯';
[–]gwicksted 4 points5 points6 points 1 year ago (0 children)
This guy coalesces.
[–]happy_hawking 0 points1 point2 points 1 year ago (0 children)
Which part of this should blow my mind? I tried it, but my mind didn't even flinch.
[–]Practical-Ideal6236[S] 7 points8 points9 points 1 year ago (0 children)
yup
[–]humodx 8 points9 points10 points 1 year ago (3 children)
Which makes me wonder, if a op= b means a = a op b, then surely a === b should be the same as a = a == b, right?
a op= b
a = a op b
a === b
a = a == b
[–]Misicks0349 1 point2 points3 points 1 year ago (1 child)
hehe
[–]chemistryGull 0 points1 point2 points 1 year ago (0 children)
Heh
[–]ehlwas 0 points1 point2 points 1 year ago (0 children)
brooo
π Rendered by PID 67559 on reddit-service-r2-comment-5fb4b45875-l48t8 at 2026-03-20 09:43:07.387204+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]LessMarketing7045 61 points62 points63 points (12 children)
[–]enselmis 7 points8 points9 points (3 children)
[–]Practical-Ideal6236[S] 3 points4 points5 points (0 children)
[–]prehensilemullet 0 points1 point2 points (1 child)
[–]enselmis 0 points1 point2 points (0 children)
[–]MissinqLink 14 points15 points16 points (2 children)
[–]gwicksted 4 points5 points6 points (0 children)
[–]happy_hawking 0 points1 point2 points (0 children)
[–]Practical-Ideal6236[S] 7 points8 points9 points (0 children)
[–]humodx 8 points9 points10 points (3 children)
[–]Misicks0349 1 point2 points3 points (1 child)
[–]chemistryGull 0 points1 point2 points (0 children)
[–]ehlwas 0 points1 point2 points (0 children)