JSFiddle - React, Tailwind, and code Playground
by shriek
JavaScript
function TestCon(){
this.x = "I am x";
function privateGeneral(){
console.log("sir:", x);
}
return {
privateGeneral: privateGeneral
}
}
TestCon.prototype ={
unleashMe: function(){
console.log("please");
}
}
var someInstance = new TestCon();
someInstance.privateGeneral()