I can use the comma operator in JavaScript to evaulate more than one expression and return the last one.
x = "foo", "bar"; // "bar"
y = 0, 21, 42; // 42
but why are parenthesis crucial if a function application is involved?
arr = [1,2,3];
z1 = (arr.push(4), arr); // [1,2,3,4]
z2 = arr.push(5), arr; // 5 ??
Why does the last statement set z2 to 5 instead of arr? How is this different to the previous to the previous statement that sets z1 correctly?