DEV Community

[Comment from a deleted post]
Collapse
 
simlrh profile image
simlrh

x &&= y can be expanded to x && (x = y)

I can see this is true, but it really hurts my brain. I always thought of it as x = x && y!

Collapse
 
cenacr007_harsh profile image
KUMAR HARSH

Yup we used to that shorthand notation for a long time.