I have the following array
  DataArray = [{
    "Year": "Year 7",
        "test1": 28,
        "test2": 19,
         "test3": 22,
         "average": ''
}, {
    "Year": "Year 8",
        "test1": 15,
        "test2": 28,
        "test3": 22,
        "average": ''           
}, {
    "Year": "Year 9",
        "test1": 25,
        "test2": 24,
         "test3": 22,
        "average": ''
 }, {
    "Year": "Year 10",
        "test1": 26,
        "test2": 19,
         "test3": 22,
        "average": ''            
}, {
    "Year": "Year 11",
        "test1": 48,
        "test2": 52,
         "test3": 22,
        "average": ''            
}];
How can I make it so that the value of 'average' is the average of test 1, test 2, and test 3 in each object?
 
     
     
     
    