I want to know why after running the third line of code the result of a is 5?
a
a = 10; b = 5; a =+ b;
Awkward formatting:
a =+ b;
is equivalent to:
a = +b;
And +b is just a fancy way of casting b to number, like here:
+b
b
var str = "123"; var num = +str;
You probably wanted:
a += b;
being equivalent to:
a = a + b;