DEV Community

Discussion on: Upcoming Interesting JavaScript ES2021 (ES12) Features to Look for

Collapse
 
miguellattuada profile image
Miguel Lattuada

Awesome article!

I think the way assignment works is quite different:

For logical assignment operators (developer.mozilla.org/en-US/docs/W...

x &&= y;

Is NOT equivalent to:
x = x && y;

Rather:
x && (x = y);

Same for ||= and ??=;