📜  javascript 扩展运算符 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:20.380000             🧑  作者: Mango

代码示例8
var num = [2, 4, 6, 8, 10];
console.log(...num)
//expected output: 2 4 6 8 10
console.log(88, ...num, 99)
// added extra new elements before and after the spread operator
//expected output: 88 2 4 6 8 10 99