Glossary: Coding Interviews in JavaScript
Nullish coalescing (??)
Also written: ??
The `??` operator picks its right side only when the left is missing (`undefined` or `null`). `counts.get(x) ?? 0` starts a count at 0 the first time.
Glossary: Coding Interviews in JavaScript
Also written: ??
The `??` operator picks its right side only when the left is missing (`undefined` or `null`). `counts.get(x) ?? 0` starts a count at 0 the first time.