1.先来个链接帮忙了解根底概念:https://www.runoob.com/w3cnot...
2.对于arguments
是什么
通过arguments获取到全副参数(主动把函数里所有参数放在一个数组里)
const fun = () => { console.log(arguments)}fun(3, 5, 6, 8) // [3,5,6,8]
3.es6的办法
通过rest形式
const fun = (first, two, ...remaining) => {console.log(first, two, remaining)}fun(3, 5, 6, 8) // 3 5 [6, 8]