In this question的答案代碼之一是:意義_在適用()
var arrays = [[1,2,3,4,5,6], [1,1,1,1,1,1], [2,2,2,2,2,2]];
_.map(_.zip.apply(_, arrays), function(pieces) {
return _.reduce(pieces, function(m, p) {return m+p;}, 0);
});
在apply(_, arrays)
我不明白什麼_
有關。
_是一個在underscore.js(http://underscorejs.org/)中定義的對象...我最好的猜測,它就像$爲jQuery(除$以外使用更多) ...並且必須是函數對象 –