Here is a JavaScript array that I need help with:
[{ Year:2000, Jan:1, Feb: }, {Year:2001, Jan:-1, Feb:0.34 }]
I want to calculate the total of Jan and Feb for each entry in the existing array and add it as a new property.
For example:
[{ Year:2000, Jan:1, Feb:, Total: 1 }, {Year:2001, Jan:2, Feb:4, Total: -0.66 }]
Can someone provide guidance on how to achieve this using JavaScript?
UPDATE: The array now includes decimal values