js随笔这关键字arguments
function f1(){
switch(
arguments.length){
case 0:
console.log(
"without information");
break;
case 1:
console.log(
"姓名"+
arguments[
0]);
break;
case 2:
console.log(
"姓名"+
arguments[
0]+
"年龄"+
arguments[
1])
}
}
f1();
f1(
"lzy");
f1(
"lzy",
24);
转载请注明原文地址: https://www.6miu.com/read-97323.html