Hey..
Correct me if i'm wrong but in chapter 2 in section Increment and Decrement Operators there is something like this:
myNumber = 1;
myVar = (myNumber++ * 10 + 1);
" What value will myVar contain? Well, because the ++ is postfixed (itâs after the myNumber variable), it will be incremented afterward. So the equation reads: Multiply myNumber by 10 plus 1 and then increment myNumber by one.
myVar = 1 * 10 + 1 = 11
Then add 1 to myNumber to get 12, but do this after the value 11 has been assigned to myVar. "
In which moment we get myNumber = 12 ?
Shouldn't myNumber be just '2' instead of '12' ?
In my calculations the result is:
var myNumber = 1;
var myVar = (myNumber++ *10 +1);
console.log(myNumber); // = 2
console.log(myVar); // = 11
Greetings
