create a string of dashes in js 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>";
// ...