JSFiddle - React, Tailwind, and code Playground
by CntChen
JavaScript
function T(){
}
T.prototype.job = 't';
T.prototype.setJob = function(){
this.job = 'c';
};
T.prototype.setJob1 = function(){
this.job = 'd';
}
var bill = new T();
var tom = new T();
console.log(bill.job); // t
console.log(bill.setJob()); //
console.log(bill.job); // c
console.log(tom.job); // t
console.log(T.prototype.job); // t