var pp = {'name': '1','work': 'teacher'} var kk = [1,2] var tt = [] for(let index = 0; index<kk.length;index++) { tt.push({...pp}) } for(let index = 0; index<kk.length;index++) { tt[index].age = kk[index] } console.log(tt)
var pp = {'name': '1','work': 'teacher'} var kk = [1,2] var tt = [] for(let index = 0; index<kk.length;index++) { tt.push({...pp}) } for(let index = 0; index<kk.length;index++) { tt[index].age = kk[index] } console.log(tt)