hi i have this vuejs2 code
totals() {
this.total = 0;
console.log(this.total_without_discount);
console.log(this.total_taxs);
console.log(this.total_discount);
this.total += this.total_without_discount;
this.total += this.total_taxs;
this.total += this.total_discount;
return Number(this.total).toFixed(this.comma);
},
now when i get the result back i gat Nan
all these functions are in computed
how can i sum the values inside totals function and return it back
thanks
total_without_discount,total_taxsortotal_discountreturns eitherundefinedorNaN. Without a proper minimal reproducible example we cannot tell you exactly what is going on besides: Make sure that they do not return that.