JSFiddle - React, Tailwind, and code Playground
by fristyr
JavaScript
const animals = {
legs: true
};
const dogs = Object.create(animals);
dogs.sayVoff = function() {
return 'Vofff';
};
const niki = Object.create(dogs);
niki.nickname = 'niki';
console.log(animals.isPrototypeOf(dogs));
console.log(dogs.isPrototypeOf(niki));
console.log(niki.nickname);
console.log(niki.sayVoff());
console.log(niki.legs);