If you do a google search for the term javascript operators and click on the first result— this mystical operator will be nowhere to be seen. At least in September of 2020, you have to click on the fourthresult and then do a search on the page for it, otherwise, it is really easy to overlook it as it is not included in any of the pretty tables.

Enough secrets!

I’m talking about the Nullish Coalescing Operator — ?? , it is a binary logical operator, the same as || (logical OR)and && (logical AND) except that it does not do type coercion, in practice it is similar to || and the syntax is as follows:

leftExp ?? rightExp

#web-development #javascript-development #javascript-tips #javascript #programming

The JavaScript operator you are probably not using
1.25 GEEK