JavaScript Nullish Coalescing ( ?? )
Description
The ??
operator returns the right operand when the left operand is
nullish (null
or undefined
),
otherwise it returns the left operand.
Learn More:
Browser Support
??
is a JavaScript 2020 feature.
ES 2020 is supported in all modern browsers since September 2020:
Chrome 85 |
Edge 85 |
Firefox 79 |
Safari 14 |
Opera 71 |
Aug 2020 | Aug 2020 | Mar 2020 | Sep 2020 | Sep 2020 |