JSFiddle - React, Tailwind, and code Playground
JavaScript
function User(){
console.log('Constructor: property1=' + this.constructor.property1) ;
}
User.prototype = {
test: function() {
console.log('test: property1=' + this.constructor.property1) ;
}
}
User.property1 = 10 ;
var inst = new User() ;
inst.test() ;