Skip to content
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 addition assignment operator #29566

Closed
wants to merge 1 commit into from

Conversation

mighty-odewumi
Copy link
Contributor

Description

Added a note to explain that the expression before the operator is evaluated once.

Motivation

I want to help readers comprehend code concepts better.

Additional details

Related issues and pull requests

Relates to #29524

@mighty-odewumi mighty-odewumi requested a review from a team as a code owner October 9, 2023 20:06
@mighty-odewumi mighty-odewumi requested review from Elchi3 and removed request for a team October 9, 2023 20:06
@github-actions github-actions bot added the Content:JS JavaScript docs label Oct 9, 2023
@@ -19,7 +19,7 @@ x += y

## Description

`x += y` is equivalent to `x = x + y`.
`x += y` is equivalent to `x = x + y` except that the expression ```x``` is only evaluated once.
Copy link
Contributor

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 🐶

Suggested change
`x += y` is equivalent to `x = x + y` except that the expression ```x``` is only evaluated once.
`x += y` is equivalent to `x = x + y` except that the expression `x` is only evaluated once.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

@mighty-odewumi
Copy link
Contributor Author

Please, I would like to request that this PR be labeled hacktoberfest-accepted if merged as I am eager to participate in Hacktoberfest and this is one of my first submissions during this event.

Thanks.

@Josh-Cena
Copy link
Member

Closing in favor of #29563

@Josh-Cena Josh-Cena closed this Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants