todashcase javascript code example
Example: todashcase javascript
let str = "Sample text";
let str2 = str.replace(/[" "]/g,"-");
console.log(str2); // Sample-text
let str = "Sample text";
let str2 = str.replace(/[" "]/g,"-");
console.log(str2); // Sample-text