The problem is more than trivial. You don't need any "info", you need just some logical thinking.
Two assignments are irrelevant here. This is correct code:
var a, b;
a = b = 2
Why? Because you simply assign two objects to two variable; it is equivalent to
b = 2; a = b
In your invalid expression the invalid part is not the combination, but rightmost part:
['name'] = 'chocbar';
. Indeed, what could it possibly mean? The object on left does not provide a reference to which you can use to access the object after the assignment. In C++ terminology, the expression ['name'] is "not an l-value", cannot appear on the left of assignment operator.
To me, it's quite hard to imagine how such a weird idea could visit anyone's head. Care to explain your logic behind that? :-)
—SA