I have
const value = [`123`, `232`, `789`, `554`, `990`] const year = ['2015', '2016', '2017', '2018', '2019'] with these two arrays, I'm trying to make an object like this.
[ {value: '123', year: '2015'}, {value: '232', year: '2016'}, {value: '789', year: '2017'}, {value: '554', year: '2018'}, {value: '990', year: '2019'}, ] How can I make this thing possible?
I tried to use map(), however failed.
map()is a fine way to do it. Why did it fail?