yangxuanLL

2019年8月5日

展开运算符

摘要: 展开运算符是ES6的特性,使用场景有以下: 一、函数调用中使用展开运算符 function test(a, b, c){} let args = [0, 1, 2]; test(...args); 我们使用...展开运算符就把0,1,2分别传给了test()的参数a,b,c。 二、数组字面量使用展开 阅读全文

posted @ 2019-08-05 14:52 yangxuanLL 阅读(1527) 评论(0) 推荐(0) 编辑

导航