DEV Community

loading...

Discussion on: Logical assignment operators in JavaScript

Collapse
hemanth profile image
hemanth.hm Author • Edited

x ||= 1 would mean x || (x = 1)

Collapse
cascandaliato profile image
cascandaliato

Aren't the two expressions x = x || y and x || (x = y) equivalent?