In Firefox 72, we'll ship the Nullish Coalescing Operator, allowing
developers to easily test for values that may be falsy, but are not null or
undefined. It will be available in the next Nightly. The proposal is in
stage 3, and has been added to the agenda for December 2019 to go to stage



Platform coverage: All, no pref

DevTools bug: N/A.

Other browsers: Intent to ship in Chrome for desktop release 80
In Safari technology preview 89

Testing: There are test262 tests covering this feature:

Use cases: The nullish coalescing operator is useful for testing for values
that may have been set to a falsy value, where that falsy value is
intentional and valid. For example, the following two expressions are
equivalent: `a ?? b` and `a !== undefined && a !== null ? a : b`.

Secure contexts: This is a JS language feature and is therefore present
in all contexts.
dev-platform mailing list

Reply via email to