You could say it's a regular OR operator (||) but it's restricted to catch undefined and null instead of it being open to all falsey values (zero, empty string, etc.).
Yes! That is true. The nullish coalescing operator is often compared to the OR operator. That requires knowledge of some other concepts like truthy and falsy on top of how the OR operator works.
I just wanted to focus on one single concept:)
You comment stands true and I am glad you wrote it!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You could say it's a regular OR operator (
||
) but it's restricted to catchundefined
andnull
instead of it being open to all falsey values (zero, empty string, etc.).Yes! That is true. The nullish coalescing operator is often compared to the OR operator. That requires knowledge of some other concepts like truthy and falsy on top of how the OR operator works.
I just wanted to focus on one single concept:)
You comment stands true and I am glad you wrote it!