Chrome Extension

Nullish coalescing operator (??)

The ?? checks if the value on the left is null or undefined and, if it is, will return a supplied value on the right.
const nullValue = null
const valA = nullValue ?? "default for A"
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Output
default for A
Was this helpful?
0 Comments
Join Devsheet Ask a Question