I have this simple code on the JavaScript.
var a = 10;
var b = 20;
a=a+b-(b=a);
document.write("a = " + a + "</br> b = " + b);
Can somebody explain me, how did these variables change the values and how is the assignment operator works in this case ? I think, that on the first step the variable b is rewrote by number from a: (b=a).