三項演算子を使用して関数名を宣言することは可能ですか?
var foo,
bar = 'bar';
(foo || bar) = function(){ // Invalid left-hand side in assignment [Bad assignment]
alert(true);
};
[foo || bar] = function(){ // Invalid left-hand side in assignment [Bad assignment]
alert(true);
};
(foo ? foo : bar) = function(){ // Invalid left-hand side in assignment [Bad assignment]
alert(true);
};