新数组:array;
原数组:list;
给原数组list的对象加一个名为indexNum的属性,属性值为str
let array = [];
let list = [{name:'aa',age:11},{name:'bb',age:22},{name:'cc',age:33},];
list.map((item,index)=>{
array.push(
Object.assign({},item,{indexNum:'str'})
)
});
console.log(123,array);