JS如何判断函数的形参个数与实参个数是否相等

形参个数: arguments.callee.length或者  函数名.length   ,arguments.callee就是取得函数名函数

实参个数: arguments.lengthspa

所以orm

function fun(a, b, c){it

    if( arguments.callee.length == arguments.length){io

    }else{function

    }call

}arguments

相关文章
相关标签/搜索