I use loop traversal to figure it out, but I feel that there is too much code. I wonder if there is a better way to calculate es6
var array = [
["18.8000", "10.0000"]
["20.0000", "10.0000"]
["20.1000", "10.0000"]
["20.2000", "1370"]
["20.6000", "2120"]
["20.9000", "1480"]
]
let total = 0;
for (let index = 0; index < array .length; indexPP) {
const element = +array[index][1];
total += element;
}
console.log(total);