BC JS

💛 JavaScript tip 💛

The nullish coalescing operator only reacts to null and undefined, contrary to the logical OR that reacts to all falsy values.

Sometimes, the nullish coalescing operator might be a better choice, especially when setting defaults. 👇🏻

You May Also Like