: "1200", "y" :"9000"}]
data.reduce((acc, cur) => {
Object
.keys(cur)
.forEach(key =>
acc[key] =
(acc[key] || 0)
+ Number(cur[key]));
return acc;
console.log(acc)
},{});
Please format the code you posted, by wrapping it in triple backticks. -> `
The result of that expression is the result...
http://jsforcats.com/ https://www.freecodecamp.org/
Обсуждают сегодня