Remove all comma from a string JavaScript

function removeLastComma(str) {
return str.replace(/,(s+)?$/, ”);
}

Leave a Reply