JSFiddle - React, Tailwind, and code Playground
by lbstr
JavaScript
var Main = function(){
this.message = "Will you send some candy?";
};
Main.prototype.callMom = function(){
alert('Hi Mom! ' + this.message);
};
function otherFile(){
// you could create a new instance of Main if there isn't one available to you here
var main = new Main();
main.callMom();
}
otherFile();