function test(a,b){
var a=arguments[0]||1;
var b=arguments[1]||2;
console.log(a)
console.log(b)
}
test(undefined,2)
运行结果
微信扫一扫
function test(a,b){
var a=arguments[0]||1;
var b=arguments[1]||2;
console.log(a)
console.log(b)
}
test(undefined,2)
运行结果
相关推荐