[Vuejs]-Problem to sum optional values from v-model in vuejs

0👍

i can not find any optional function in js so i solved with conditions:

            var a = this.cash ?  parseFloat(this.cash) :0
            var b = this.kNetOnline ?  parseFloat(this.kNetOnline) :0
            var c = this.kNet ?  parseFloat(this.kNet) :0

but i think is not working for large scale data

Leave a comment