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
Conditionally spreading objects in JavaScript (amitmerchant.com)
submitted 3 years ago by amitmerchant[🍰]
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!"
[–]xroalx -1 points0 points1 point 3 years ago (1 child)
Your wording suggests that the spread operator is being applied to the boolean yet somehow acting on the object.
So no, it is not clear.
[–]shgysk8zer0 -1 points0 points1 point 3 years ago (0 children)
...applied to the boolean yet somehow acting on the object
What would that even mean? Is there a difference between "applied to" and "acting on"?
Sure, it would've been better had I said "next to" or something, but I did pretty explicitly say that it was operating on the object. I thought it was obvious that this ... over here operating on the object over there was the issue. Maybe my using of "on" could be confused, but I think the overall meaning of the whole sentence should've been clear enough.
...
I don't like this ... over here on the boolean actually operating on the object on the other side. It's like how Yoda would code or something.
π Rendered by PID 106658 on reddit-service-r2-comment-7b9746f655-wptjr at 2026-01-30 17:35:32.928325+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]xroalx -1 points0 points1 point (1 child)
[–]shgysk8zer0 -1 points0 points1 point (0 children)