点击运行
function fun1(...params) { console.log(params.length); } fun1(); fun1(5); fun1(5, 6, 7);
运行结果 :
正在执行...