Please read whole topic, before post answer. No answer found to this question in post: ++someVariable Vs. someVariable++ in Javascript
var i = 1;
i = i++ * 2; // i = 2, .. why not 4 ?
interpreter does the multiply (1*2), but where is the increment ( i++ )?
var i = 1;
i = ++1 * 2; // i = 4
I'm understand, that the i++ does the increment after the statement, ++i does it before the statement, but in this example: i = i++ * 2 // (1*2), how the interpreter works?, where is the increment of i in this case? maybe i = (1*2)+1 )), or i = (1*2) and no more i exist, and nothing to increment??
HOW ?
P.S. I think, it is a wrong question, but as Brooks Hanes said(in comment), this is a learning example.