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

I think a plausible explanation is that whatever Corbyn says or does, his critics will denounce - no matter how much hypocrisy it necessitates.


Corbyn opposes the exploitation of foreign sweatshop-workers - Labour MPs complain he's like Nigel

He speaks up in defence of migrants - Labour MPs whinge that he's not listening to the public's very real concerns about immigration:

He's wrong to prioritise Labour Party members over the public:

He's wrong to prioritise the public over Labour Party