how we replace space with dash 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>";
// ...