function ArgTest(a, b){
var s = ""; s += "Expected Arguments: " + ArgTest.length; s += "<br />"; s += "Passed Arguments: " + arguments.length; return s;}document.write(ArgTest(1, 2));// Output: // Expected Arguments: 2// Passed Arguments: 2本文共 294 字,大约阅读时间需要 1 分钟。
function ArgTest(a, b){
var s = ""; s += "Expected Arguments: " + ArgTest.length; s += "<br />"; s += "Passed Arguments: " + arguments.length; return s;}document.write(ArgTest(1, 2));// Output: // Expected Arguments: 2// Passed Arguments: 2转载于:https://my.oschina.net/u/1458864/blog/282761