Have you ever spent an afternoon reading through the Mozilla docs? If you have, you are well aware that there is a lot of information on JavaScript available online. This makes it easy to overlook the more out of the ordinary JavaScript operators.

However, just because these operators are uncommon doesn’t mean they are not powerful! They each look syntactically similar, but be sure to read about each as they work in different ways.

Let’s dive in!

1\. ?? Operator

In JavaScript the ?? operator is known as the nullish coalescing operator. This operator will return the first argument if it is **not **null/undefined, otherwise, it will return the second argument. Let’s see an example.

null ?? 5 // => 5
3 ?? 5 // => 3

#react #web-development #javascript #programming #coding

4 Powerful JavaScript Operators You’ve Never Heard Of
3.55 GEEK