JSFiddle - React, Tailwind, and code Playground
by JohnMunsch
HTML
<div id="result"></div>
JavaScript
function Person(name) {
this.name = name;
}
Person.prototype.greet = function (otherName) {
return "Hi " + otherName + ", my name is " + this.name;
}
var john = new Person("John");
$("#result").text(john.greet("Mike"));