CreationTime--2018年7月2日15点18分

Author:Marydon

/**
 * 声明一个函数
 * @explain 传参个数不确定
 */ 
function test() {
    // 如何取值?
    // 需要传参个数和传参顺序
    var name = arguments[0];
    var website = arguments[1];
    var tip = arguments[2];
    alert(tip);
}
// 调用
test('Marydon','http://www.cnblogs.com','测试不固定传参');

 

 相关推荐:

 

 

相关文章:

  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-01-20
  • 2021-11-09
  • 2022-12-23
  • 2022-02-21
猜你喜欢
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
相关资源
相似解决方案