JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div"></div>
JavaScript
var words = "This is what I want!";
var newWords = words.replace("what", "what <br />");
document.getElementById("div").innerHTML = newWords;
<div id="div"></div>
var words = "This is what I want!";
var newWords = words.replace("what", "what <br />");
document.getElementById("div").innerHTML = newWords;