replace empty spaces to hyphens javascript code example
Example: replace all spaces with dash in javascript
title = title.replace(/\s/g , "-");
var html = "<div>" + title + "</div>";
// ...
title = title.replace(/\s/g , "-");
var html = "<div>" + title + "</div>";
// ...