DEV Community

Discussion on: How to use the nullish coalescing operator (??) in Javascript

Collapse
 
ansmtz profile image
ansmtz • Edited

Just to recap, null coalescing is operator that works almost like a logical OR, but deals only with nullish values, which only null and undefined.

Thanks for your examples!

Collapse
 
arikaturika profile image
Arika O

Exactly. Only if what's on the left side is 'null or undefined, it returns the right side of the evaluation. I hope it helped.