Answers for "how to delete commas in string js"

1

remove commas from string javascript

var purpose = "I, Just, want, a, quick, answer!";

// Removing the first occurrence of a comma
var result = purpose.replace(",", "");

// Removing all the commas
var result = purpose.replace(/,/g, "");
Posted by: Guest on October-23-2020

Code answers related to "how to delete commas in string js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language