0
ATT,下面的工具有什麼區別嗎?
1.下面的js代碼有什麼區別?
var a = [];
f = function(){
a = [].concat(a,[].slice.call(arguments));
}
2.
var a = [];
f = function(){
a = Array.prototype.concat(a,[].slice.call(arguments));
}
你會期待什麼區別? – Philipp
'[] .concat === Array.prototype.concat' – megawac
沒有區別。 – Praveen