Skip to content

fix: correct terminology for object initializer property names#43182

Merged
Josh-Cena merged 2 commits intomdn:mainfrom
MrLawrenceKwan:fix/object-initializer-property-key-43095
Feb 21, 2026
Merged

fix: correct terminology for object initializer property names#43182
Josh-Cena merged 2 commits intomdn:mainfrom
MrLawrenceKwan:fix/object-initializer-property-key-43095

Conversation

@MrLawrenceKwan
Copy link
Contributor

Replace incorrect use of 'identifier' with 'property key' and clarify that property names in object initializers can be identifier names, number literals, or string literals.

As noted in the issue, the original text incorrectly states that each property name is an 'identifier', but identifiers are only one of the valid property key types. Numbers and string literals are not identifiers.

Fixes #43095

@MrLawrenceKwan MrLawrenceKwan requested a review from a team as a code owner February 21, 2026 05:40
@MrLawrenceKwan MrLawrenceKwan requested review from Josh-Cena and removed request for a team February 21, 2026 05:40
@github-actions github-actions bot added Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed labels Feb 21, 2026
Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you!

@github-actions
Copy link
Contributor

Preview URLs (1 page)

@Josh-Cena Josh-Cena merged commit 59433be into mdn:main Feb 21, 2026
8 checks passed
wbamberg added a commit to wbamberg/content that referenced this pull request Feb 26, 2026
* upstream/main: (619 commits)
  Fix usage of numbers iterator in zip example (mdn#43236)
  Synchronize with BCD v7.3.3 (mdn#43178)
  Add Firefox 148 sanitizer release note (mdn#43234)
  WebDriver conformance changes for Firefox 148 (mdn#43228)
  ci(auto-merge): fix target-repo (mdn#43139)
  Add session mgt guide (mdn#42908)
  docs(firefox-release): Finalize release notes for Fx148 release (mdn#43225)
  [Technical Review] Add folder for WebDriver BiDi and create initial landing pages (mdn#43153)
  fix: correct 'after' to 'before' in break-before always/all descriptions (mdn#43185)
  added the release note for position-try-order (mdn#43223)
  Clarify that role="button" does not inherit button functionality (mdn#43186)
  Fix wording mistake in Temporal.ZonedDateTime (mdn#43188)
  Fix description for break-before: always (mdn#43190)
  improve confusing sentance (mdn#43172)
  Document scoped customElementRegistry and related properties (mdn#43149)
  fix: correct terminology for object initializer property names (mdn#43182)
  Fix typo about arrow function expression body (mdn#43175)
  Update InterfaceData based on WebRef (mdn#43179)
  Fix clarify visibilitychange event intro to mention all triggers (mdn#43177)
  [WebExtensions] Document runtime.getVersion() method (mdn#42971)
  ...
jdatapple pushed a commit to jdatapple/content that referenced this pull request Mar 6, 2026
…3182)

* fix: correct terminology for object initializer property names

* Apply suggestion from @Josh-Cena

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Each property name before colons is an identifier (either a name, a number, or a string literal)"

2 participants