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

7 lines
104 B
JavaScript

var _o, _o2, _b;
let o;
o ?? (o = {});
(_o = o).a ?? (_o.a = 1);
(_o2 = o)[_b = "b"] ?? (_o2[_b] = 2);