-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarified compound assignment operator #29563
Conversation
@@ -24,6 +24,7 @@ Logical AND assignment [_short-circuits_](/en-US/docs/Web/JavaScript/Reference/O | |||
```js | |||
x && (x = y); | |||
``` | |||
Except that the expression x is only evaluated once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mdn-linter] reported by reviewdog 🐶
Except that the expression x is only evaluated once. | |
Except that the expression x is only evaluated once. |
@mighty-odewumi As far as I'm concerned, we are not participating in Hacktoberfest (correct me if I'm wrong). Even if we do, please don't gamify the system—one PR for one concrete set of changes, not one PR per page. We don't want to merge ten PRs doing the same thing. |
I'm not trying to game the system and I'm sorry if it came off as such. I use a mobile phone to carry out the fixes and I am editing them all in the GitHub UI not a terminal. I'm not in a position to use a PC at the moment. I thought one needs to commit and make a pull request as one makes changes in the GUI so as not to lose one's works. If not, I would have made all my commits a single Pull Request. I'm sorry once again. |
Thanks for the explanation—I understand better now. We appreciate your passion for contributing, but do note that every PR sent is a notification for us and a new serial number created, which is unnecessary. I will assume good intentions, but just to be aware in your future open-source journey. |
Thanks for your understanding. I will keep that in mind. Sorry for the troubles. |
Are you able to update your PR in the next few days? We have a competing PR and yours came in slightly earlier, but we may favor the other one as well. |
I don't think I would be able to. You can merge the other PR. I guess there would be some other issues I could still contribute to later in the future. Thanks. |
Thanks for your contribution still. Will look at the other PR. |
Description
Added clarifying note on compound assignment operator
&&
.Motivation
I hope to prevent confusion during usage of docs and give the reader a better understanding of the concept.
Additional details
Related issues and pull requests
Fixes #29524