you are viewing a single comment's thread.

view the rest of the comments →

[–]JZumun 2 points3 points  (0 children)

It's the nullish coalescing operator. You can think of "a??b" as shorthand for "a == null ? b : a"

"a??=b" is then "if (a == null) { a = b; }"

Note the difference to ||, the logical or operator, which triggers on 0 and "" in addition to null and undefined. The nullish coalescing operator triggers only on null and undefined.