187
rated 0 times
[
188]
[
1]
/ answers: 1 / hits: 22521
/ 7 Years ago, mon, february 27, 2017, 12:00:00
I have multiple JavaScript objects:
{
a: 12,
b: 8,
c: 17
}
and
{
a: 2,
b: 4,
c: 1
}
I need to sum these two object by keys
Result:
{
a: 14,
b: 12,
c: 18
}
Do you have any solutions in JavaScript?
I use Object.keys.map
but it's too long because I have like 100 elements in my object.
More From » sum