SyntaxFix
Write A Post
Hire A Developer
Questions
Try escaping the slash: someString.replace(/\//g, "-");
someString.replace(/\//g, "-");
By the way - / is a (forward-)slash; \ is a backslash.
/
\