JSFiddle - React, Tailwind, and code Playground
JavaScript
function newFunc() {
this.name = "this is person name";
this.Age = "16 Years";
}
newFunc.prototype.init = function() {
var that = this;
setInterval(function() {
that.xyz()
}, 1000);
}
newFunc.prototype.xyz = function() {
console.log(this.Age);
}
var abc = new newFunc();
abc.init();