JSFiddle - React, Tailwind, and code Playground
by darkajax
HTML
<div>
something
</div>
JavaScript
class Mammal {
// prototype chain
constructor(name){
this.name=name;
}
getName(){ return this.name; }
setName(name){ this.name=name; }
}
class Pet extends Mammal { // how many dependencies? // hint,super,prototype chain,scope chain,
// prototype chain
constructor(name){
super();
this.name=name;
}
}
const user = new Mammal('Tom');
const pet = new Pet('Iris');