Skip to content

Conversation

@dontcallmedom
Copy link
Contributor

Description

Add example-bad and example-good annotations to JS examples of using with a null value.

Motivation

To clarify which example is good to follow

Additional details

Related issues and pull requests

To clarify which example is good to follow
@dontcallmedom dontcallmedom requested a review from a team as a code owner January 28, 2026 10:28
@dontcallmedom dontcallmedom requested review from Josh-Cena and removed request for a team January 28, 2026 10:28
@github-actions github-actions bot added Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed labels Jan 28, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2026

Preview URLs (1 page)

(comment last updated: 2026-01-28 10:40:39)

Clarified the usage of 'using' to allow null or undefined values, and improved examples for better understanding.
@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jan 28, 2026
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Thanks @dontcallmedom, that change makes sense to me.

However, before merging, I had a look at the surrounding structure, fixed a grammar issue, and reordered the section to put the acquireResource() function out into its own code block.

Does that make sense to you — it is neither part of the good or bad code, right?

@dontcallmedom
Copy link
Contributor Author

that makes a lot of sense, thanks!

@chrisdavidmills chrisdavidmills merged commit 075e089 into mdn:main Jan 28, 2026
8 checks passed
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