let Tota_principal = h.map(value=> value['Principal'])
var new_array = [];
Tota_principal.reduce(function(a,b,i) {
return new_array[i] = a+b;
},0)
console.log(new_array)
The new_array gives a concatenated value rather than a cumulative sum of the table. also where do i add toFixed()