是否可以使用三元運算符聲明函數名稱?三元運算符函數聲明
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);
};
我猜,沒有.... – Azodious
太可怕了回答:P – yckart