<分区>
Possible Duplicate:
How to use Math.max, etc. as higher-order functions
使用 Mozilla 的 Javascript 1.6 数组“扩展”功能(map、reduce、filter 等),为什么以下内容会按预期工作:
var max = [1,2,3].reduce(function(a,b) { return Math.max(a,b); });
但以下不起作用(它产生 NaN):
var max2 = [1,2,3].reduce(Math.max);
是因为 Math.max 是可变参数函数吗?