I need to know whether operator Associativity is the same as the order of evaluation of assignment operator and other operators in JavaScript for example
var x;
x = 10;
In the above code I need to know whether the Assignment expression x = 10;
is executed from "right to left" or "left to right" because the operator Associativity of the Assignment operator is "right to left" im a little bit worried about how a normal assignment expression like this x = 10;
is executed. Is it executed from "right to left" or "left to right" where as in the below code you can see the assignment expression is executed from right to left.
var y;
var z;
y = z = 10; // In this snippet you can see that both the variables "y" and "z" hold the value of number 10 this means that the Assignment operator is executed from "right to left";
// Now i must know whether a normal Assignment operator is also executed from "right to left" because Assignment operator is having "right to left" Associativity;
var c;
c = 10; // Not sure whether how and to which side this assignment expression is executed is it executed from "left to right" or "right to left"