var obj = {};
var prop = 'aaa';
function foo(arg) {
return console.log('passed: ' + arg);
}
// foo(obj[prop] = 'bbb') --> just passing result of the assignment expression, not an object
// foo(((obj[prop] = 'bbb'), obj)); //works
foo(obj, obj[prop] = 'bbb');