es7合并数组相关 报错Uncaught (in promise) TypeError: Invalid attempt to spread non-iterable instance...
方法一:leto1={a:1,b:2,c:3};leto2={…o1,d:4};//o2={a:1,b:2,c:3,d:4}letarr1=[0,1,2];letarr2=[…arr1,3];//arr2=[0,1,2,3]方法二:leto1={a:1,b:2,c:3};leto2=Objcet.assign({},o1,{d:4});//o2={a:1,b:2,c:3,d:4};转载于:http