Justin Ridgewell a7bddc02ba
Add ??= to Logical Assignment Operators (#7623)
`??=` is being merged into the Logical Assignment Operator proposal, and the overall proposal will wait until nullish coalescing is finalized.
2018-03-25 18:58:51 +01:00

5 lines
42 B
JavaScript

let o;
o ??= {};
o.a ??= 1;
o["b"] ??= 2;