<script> function config(baseURL, ...other) { console.log(baseURL); // other 是真数组,动态获取实参 console.log(other); } // 调用函数 config('http://baidu.com', 'get', 'json');</script> 总结: ... 是语法符号,置于最末函数形参之前,用于获取多余的实参借助 ... 获取的剩余实参