Skip to content

docs: document existential operator assignment - #5502

Open
Hashim1999164 wants to merge 1 commit into
jashkenas:mainfrom
Hashim1999164:docs-existential-soak-assignment
Open

docs: document existential operator assignment#5502
Hashim1999164 wants to merge 1 commit into
jashkenas:mainfrom
Hashim1999164:docs-existential-soak-assignment

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • Document that the existential accessor (?. / ?[]) can appear on the left-hand side of an assignment, which differs from JavaScript optional chaining.
  • Add a short example and a row in the completeness table under Existential Operator.

Fixes #5446

Test plan

  • Confirm the new soak_assignment example compiles as shown (el?.href = 'b' only assigns when el != null)
  • After docs rebuild, check the Existential Operator section on the site for the new paragraph, example, and table row

CoffeeScript allows ?. in assignment targets, unlike JS optional chaining.
Document this in the Existential Operator section with an example and table row.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Document Existential Operator Assignment

1 participant