摘要:
在一个函数体内,标识符arguments具有特殊含义.Arguments对象是一个类似数组的对象eg:验证函数参数的正确数目function f(x, y, z) { if (arguments.length != 3) { throw new Error("function with " + arguments.length + "arguments, but it expects 3 arguments.") // now do the actual function } }eg:简单的max函数能接受任意数目的实际参数function ... 阅读全文
posted @ 2013-10-03 10:35
Master HaKu
阅读(4902)
评论(0)
推荐(0)

浙公网安备 33010602011771号