Answers for "javascript string replace spaces with dashes"

7

javascript replace spaces with dashes

title = title.replace(/\s/g , "-");
Posted by: Guest on August-24-2020
0

replace spaces with dashes

const text = "codetogo saved me tons of time";

text.replace(/ /g, "-");
Posted by: Guest on October-20-2021

Code answers related to "javascript string replace spaces with dashes"

Code answers related to "Javascript"

Browse Popular Code Answers by Language