JSFiddle - React, Tailwind, and code Playground
by yaero
JavaScript
function Person(name) {
this.name = name;
}
Person.prototype._getName = function() {
return this.name;
}
Person.prototype.getName = function() {
return this._getName();
}
var p = new Person('John');
console.log(p.getName());