Despite working with JavaScript for quite a while now I've only recently started reading up about operator precedence, however I've stumbled across a bit of a wall which I can't seem to find an answer for.
Consider the following example:
x=1; // x === 1
x++; // x === 2
x=1; // x === 1
y=x++; // x === 2, y === 1
If ++ has a higher precedence than =, how is y not becoming 2?
Now consider:
x=1; // x === 1
y=++x; // x === 2, y === 2
If ++x and x++ have identical associativity, how come y is becoming 2 in this case?
Here's an accompanying Fiddle.