1 of 5

Logical Assignment Operators

For Stage 4

2 of 5

In a nutshell

Input

Output

a ||= b

a || (a = b)

a &&= b

a && (a = b)

a ??= b

a ?? (a = b)

3 of 5

NamedEvaluation Landed!

  • Simple to fix in JSC, SM, and V8!

4 of 5

Checklist

  • ✅ Test262 (/test/language/expressions/logical-assignment/*)
  • ✅ Implementations
    • JSC (96%, test() &&= 1 throws ReferenceError due to legacy += web compat)
    • SM (93%, null[p] &&= 1 evaluates property but should just throw)
    • V8 (93%, test() &&= 1 throws ReferenceError due to legacy += web compat)
  • ✅ PR (#2030)
  • ✴️ Spec Editor Approvals

✅ Kevin Gibbons

✴️ Jordan Harband

✅ Michael Ficarra

✅ Shu-yu Guo

5 of 5

Stage 4?