JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">
Test
</div>
JavaScript
var test =(function(){
var tom = function(){
this.to = "begr"
}
tom.prototype.get = function(){
return this.to;
}
return {
test: function(str){return str + "append"},
toto: tom
}
})();
document.getElementById('test').innerText = test.toString();