I know in javascript
x = y = z means x = z and y = z
x+=z means x=x+z;
So if I want x=x+z and y=y+z, I tried x+=y+=z not working
anyone have a better idea to write short code instead x+=z;y+=z
EDIT
First thanks for everyone involved in my question.
Here I wanna explain something why I have this question in first place.
I tried to write some code like x+='some html code', and I need to y+='the same html code'. So naturally I do not want to create another var z='the html code first then do x+=z and y+=z
Hope my explain make sense. Anyway, I am going to close this question now. Thanks again.
Assuming addition, and not concatenation, this works:
but seriously, don’t use it !
For those that want to figure out how, the sequence of evaluation (where I use
nto show the current intermediate result) is approximately: