//向对象数组中添加新的属性
var arr = [{id:1,name:'xiaohua'},{id:2,name:'xiaohong'},]
var newArr = arr.map(v=>{
return {...v,checked:true}
})
console.log(arr);//不改变原数组,...将每个对象序列化
//连接两个数组的es6方式(...将数组序列化,成为逗号隔开的序列)
arr1 = [1,2];
arr2= [3,4,5];
arr1.push(...arr2)