The nullish coalescing operator provides a concise syntax for setting a default value if the given value is .and are the only nullish values in JavaScript.Nullish coalescing is typically used for assigning default values.Older JavaScript code often used || for assigning default values, but || is error prone because it captures all falsy values, like 0, empty string, and false.
[
add
]
[
|
|
...
]