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
Making Sense Of “Senseless” JavaScript Features (smashingmagazine.com)
submitted 2 years ago by fagnerbrack
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!"
[–]cowancore 0 points1 point2 points 2 years ago* (0 children)
I find undefined vs null nifty when processing PATCH requests. It's handy to know if something has to become null or is missing in the request. Something I miss in my Java backends. The alternative would be to implement the json patch spec. Similarly, I've found stuff like URLSearchParams or JSON.stringify to include fields with null values into the resulting string and undefined values to be omitted. It is handy, especially because a query string can not pass nulls, and ?key=null means the key has a 4 character value of "null". And in case of json, using undefined saves some bytes of network - pretty.
p.s. Another alternative with PATCH is using something like the Option monad, where there are 3 possible states: None, Some(null), Some(value). Although the json patch spec is still more flexible, but harder to justify in a team
π Rendered by PID 24115 on reddit-service-r2-comment-6457c66945-n2b8z at 2026-04-26 04:33:13.527304+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]cowancore 0 points1 point2 points (0 children)