DEV Community

Discussion on: Logical assignment operators in JavaScript

Collapse
 
hakonkrogh profile image
Håkon Krogh

Very useful new features! Looks like you got the variables mixed up in the examples:

x || (y = z);

Should be

x || (x = y);

... unless I got this all wrong?

Collapse
 
hemanth profile image
hemanth.hm

True, fixed it. I was trying to bring in another variable.