摘要:
查看文章函数传参function restParam(a,b,...c){};//b以后所有参数放入c数组中//c必须为最后一个参数拓展应用fn(...[1,2,3])等同于fn(1,2,3)级联更容易[1,2,...[3,4,5],6,7]; //1,2,... 阅读全文
摘要:
分析解构文章详情变量解构单层var {foo}=pony;等同 var foo=pony.foo;var {foo:baz}=pony;等同var baz=pony.foo;var {foo=‘bar’}=baz; //如果baz.foo为undefined... 阅读全文