JSFiddle - React, Tailwind, and code Playground

by BramVanroy

HTML

<div id="output">
    <pre></pre>
</div>

JavaScript

var str = "I really like cookies, you know. Cookies are great. Cookies are awesome. Cookies save people's lives.",
    b = str.split(" "),
    c = $.each(c, function (i) {
        if (this == 'cookies') {
            var $this = $(this);
            $this.replaceWith('cookies', '	cookies \n');
        }
    });
console.log(c);
$("#output>pre").html(c);