Parenthesis in that context act as a statement with the last item passed being the passed value.
In other words:
(2, 1) === 1
The 2
is evaluated, however, so:
(foo(), bar())
is effectively doing:
foo();
return bar();
What you want in this case is [2, 1]