JSFiddle - React, Tailwind, and code Playground
HTML
<span></span>
CSS
span {
background: green;
}
JavaScript
function spaceToNbsp(str) {
return str.replace(/ /g, " ");
}
$("span").html(spaceToNbsp("something "));
<span></span>
span {
background: green;
}
function spaceToNbsp(str) {
return str.replace(/ /g, " ");
}
$("span").html(spaceToNbsp("something "));