Original JavaScript

[1] Assignment introduces a subtlety into step 1 of the evaluation rule. As shown in exercise 3.8, the presence of assignment allows us to write expressions that will produce different values depending on the order in which the subexpressions in a combination are evaluated. Thus, to be precise, we should specify an evaluation order in step 1 (e.g., left to right or right to left). However, this order should always be considered to be an implementation detail, and one should never write programs that depend on some particular order. For instance, a sophisticated compiler might optimize a program by varying the order in which subexpressions are evaluated. The ECMAScript standard specifies evaluation of subexpressions from left to right.
[2] Assignment introduces a subtlety into step 1 of the evaluation rule. As shown in exercise 3.8, the presence of assignment allows us to write expressions that will produce different values depending on the order in which the subexpressions in a combination are evaluated. To eliminate such ambiguities, JavaScript specifies left-to-right evaluation of the subexpressions of combinations and of the argument expressions of applications.
[3] Footnote 2 in chapter 1 mentions subtle differences between the two in full JavaScript, which we will ignore in this book.
[4] We mentioned in footnote 2 in chapter 1 that the full JavaScript language allows assignment to names that are declared with function declarations.
[5] This example does not make use of the fact that the parameter x is a variable, but recall the function make_withdraw in section 3.1.1, which relied on its parameter being a variable.
3.2.1   The Rules for Evaluation