DEV Community

Discussion on: Logical assignment operators in JavaScript

Collapse
 
hemanth profile image
hemanth.hm • 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?