Title says it all I have the following function :
var foo = function(arg1, arg2,arg3) {
// code
}
I want to do something like :
foo('bar', (x == true ? arg2, arg3 : arg2,arg3))
But I get hit with SyntaxError: Unexpected token ,
what is the right syntax to do something like this?