KinoOfficial / ES6-course

0 stars 0 forks source link

rest参数... #8

Open KinoOfficial opened 3 months ago

KinoOfficial commented 3 months ago

ES6 引入 rest 参数(形式为...变量名),用于获取函数的多余参数,这样就不需要使用 arguments对象了。rest 参数搭配的变量是一个数组,该变量将多余的参数放入数组中

image