Answers for "how to replace spaces in a string with a dash in javascript"

0

replace all spaces with dash in javascript

title = title.replace(/\s/g , "-");
var html = "<div>" + title + "</div>";
// ...
Posted by: Guest on July-16-2020

Code answers related to "how to replace spaces in a string with a dash in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language