Skip to content

Clarify object references in destructuring rest bindings - #44897

Open
Anusha-Pwr wants to merge 1 commit into
mdn:mainfrom
Anusha-Pwr:clarify-rest-binding-object-references
Open

Clarify object references in destructuring rest bindings#44897
Anusha-Pwr wants to merge 1 commit into
mdn:mainfrom
Anusha-Pwr:clarify-rest-binding-object-references

Conversation

@Anusha-Pwr

Copy link
Copy Markdown
Contributor

Description

Clarifies that object values collected by a rest property or rest element are not cloned. Adds an object destructuring example showing that the source and rest binding refer to the same nested object.

Motivation

The existing section explains that rest bindings create a new array or object, but it does not clarify that collected object values retain their identity. This helps readers understand why mutating a nested object through the rest binding can also be observed through the source.

Additional details

None

Related issues and pull requests

None

@Anusha-Pwr
Anusha-Pwr requested a review from a team as a code owner July 23, 2026 17:27
@Anusha-Pwr
Anusha-Pwr requested review from Josh-Cena and removed request for a team July 23, 2026 17:27
@github-actions github-actions Bot added Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed labels Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants