DEV Community

Cover image for Javascript (ES2020) **Nullish Coalescing_( ?? ) and Optional Chaining ( ?. )Explained

Javascript (ES2020) **Nullish Coalescing_( ?? ) and Optional Chaining ( ?. )Explained

Vikrant Bhat on July 04, 2020

Nullish Coalescing operator ( ?? ) It is a logical operator that returns its right-hand side operand when its left-hand side operand is ...
Collapse
 
mykalcodes profile image
Mykal •

Great article going over these new features Vikrant!
I've used optional chaining before in ruby but have never used nullish coalescing.

The way you explained nullish coalescing was perfect; I totally see how that could be useful.

Collapse
 
bhatvikrant profile image
Vikrant Bhat •

I am glad, I could help! 😁

Collapse
 
emadsaber profile image
emadsaber •

This feature exists in C# since years, good news to be in javascript, thanks.

Collapse
 
bhatvikrant profile image
Vikrant Bhat •

😁

Collapse
 
pris_stratton profile image
pris stratton •

Well explained and concise. Nice read 😀

Collapse
 
bhatvikrant profile image
Vikrant Bhat •

😁

Collapse
 
reli profile image
Reli •

Very useful! thank you!

Collapse
 
bhatvikrant profile image
Vikrant Bhat •

😁

Collapse
 
jupiteris profile image
Jupiter Programmer •

That's very kind of the article.
Especially Nullish coalescing is a perfect solution.
Thanks again for your article.
Hope you another article.

Collapse
 
bhatvikrant profile image
Vikrant Bhat •

Glad to help 😁

Collapse
 
hubert17 profile image
Bernard Gabon •

Thank you, C#!

Collapse
 
bhatvikrant profile image
Vikrant Bhat •

My pleasure!