Answers for "js replace spaces by dash"

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 "js replace spaces by dash"

Code answers related to "Javascript"

Browse Popular Code Answers by Language