Optional chaining (?.) - JavaScript | MDN
5
Public whispers
5
Contributors
2026-07-23 09:59:37
First whispered
Public whispers on this page
Text Highlight2026-07-23 13:20:37
Original Highlight Excerpt
"The nullish coalescing operator may be used after optional chaining in order to build a default value when none was found"
Whisper Note
Wait, but ?? only triggers on null/undefined, not on falsy values, right?
Text Highlight2026-07-23 13:11:37
Original Highlight Excerpt
"The nullish coalescing operator may be used after optional chaining in order to build a default value when none was found"
Whisper Note
Good tip, combining ?. with ?? saves so many lines of code.
Text Highlight2026-07-23 10:17:37
Original Highlight Excerpt
"This feature is well established and works across many devices and browser versions."
Whisper Note
July 2020? Feels like it's been around forever already.
Text Highlight2026-07-23 10:08:37
Original Highlight Excerpt
"This feature is well established and works across many devices and browser versions."
Whisper Note
Still don't trust it on older browsers in some enterprise apps.
Text Highlight2026-07-23 09:59:37
Original Highlight Excerpt
"This feature is well established and works across many devices and browser versions."
Whisper Note
Finally, no more checking every nested property manually.
Share this page's whispers
Short link
https://domwhisper.com/s/24df590208c6Embed snippet
<iframe src="https://domwhisper.com/embed/24df590208c6" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>See what people are discussing on developer.mozilla.org
Install DomWhisper to view live whispers as you browse, and join the discussion.
Get the extension