[Vuejs]-How to remove comma in a value in Vue.js

0👍

Just replace , using replace

displayValue(){
    var displayValue = this.value || ""; //check if this.value is null
    displayValue = String(displayValue).replace(/,/g, ""); //replace ,
}

2👍

if (displayvalue.indexOf(',') !== -1) {
  displayvalue = displayvalue.replace(/,/g, '');
}

Leave a comment