JSFiddle - React, Tailwind, and code Playground

JavaScript

var tag = 'hello i am a tag with blanks';

document.write(tag.replace(' ','-'));