I have created a two dimensional array from a Google spreadsheet.
Logger.log shows it as this:
[ [-4.0], [-1.0], [4.0], [2.0], [1.0], [3.0] ]
All I am trying to do is to sum the 6 elements shown above to return the correct total of 5.0
I have tried using the reduce() method on the array which Logger.log then shows as:
[ -4.0, -1.0, 4.0, 2.0, 1.0, 3.0 ]
But I just cannot figure out how to sum the six elements despite much Googling. This must be childishly simple - please could someone help this Apps Script novice?