JSFiddle - React, Tailwind, and code Playground
JavaScript
function Person(name) {
this.name = name || 'jhjhg';
this.lg = function() {
console.log(this.name)
};
}
// never gets called!!!
Person.prototype.name = 'sdfsdf';
var Bill = new Person('Bill');
var Jill = new Person();
Bill.lg();
console.log(Bill.name);
console.log(Jill.name);
Jill.lg();