In the MDN the comma operator is described:
The comma operator evaluates each of its operands (from left to right) and returns the value of the last operand.
But why does
var a, b = 3
return undefined
, while the expression
b = 3
will return 3, doesn't it?