function test(a,b){
console.log(test.length)//形参的个数 2 
console.log(arguments.length)//实参的个数 3
}
test(1,3,4)

js函数的形参与实参个数可以不相等 

相关文章:

  • 2021-10-25
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2021-07-18
  • 2021-07-05
  • 2021-11-08
  • 2021-07-14
相关资源
相似解决方案