JSFiddle - React, Tailwind, and code Playground
by btipling
JavaScript
function Thing() {
console.log(this.foo);
}
Thing.prototype.foo = "bar";
var thing = new Thing(); //logs "bar";
console.log(thing.foo); //logs "bar"
by btipling
function Thing() {
console.log(this.foo);
}
Thing.prototype.foo = "bar";
var thing = new Thing(); //logs "bar";
console.log(thing.foo); //logs "bar"