https://i.sstatic.net/K8Rqj.png
To manually add a row, each row is stored in the "items" array
items: [
{
occuGroup:'',
constType:'',
bfloorArea: 0,
cfloorArea: 0
},
],
Below is the code I wrote to calculate the total:
subTotal: function() {
var total = 0;
this.items.forEach(element => {
total += (element.bfloorArea);
});
return total;
},
Any suggestions on how I can improve this? Thanks!