I've seen in JavaScript code like:
var x = (1, 2);
which would then evaluate x to 2. Also
var x = (false, 2);
also evaluates x to 2, or any other value (so it doesn't appear to be identical to var x = false || 2
).
It would appear so far that the value of x in this case is always equal to the second comma-separated value, so then what's the point exactly? What does the expression var x = (y, z);
do?