const names = ['John', 'Mike', 'Nash']
const age = [32, 33, 56]
const people = names.reduce((accumulator, currentValue, currentIndex) => {
accumulator['name'] = {age: age[currentIndex]}
return accumulator
},
{}
})
const names = ['John', 'Mike', 'Nash']
const age = [32, 33, 56]
const people = names.reduce((accumulator, currentValue, currentIndex) => {
accumulator['name'] = {age: age[currentIndex]}
return accumulator
},
{}
})