JSFiddle - React, Tailwind, and code Playground
by dzenkovich
JavaScript
!function () {
var Being = {
life: 1,
move: function () {
console.log('glide');
}
};
var Animal = {
inhabbits: 'terrain',
move: function () {
console.log('run');
},
__proto__: Being
};
var Fish = {
inhabits: 'water',
tail: true,
move: function () {
console.log('swim');
},
__proto__: Being
};
var Cat = {
life: 2,
tail: true,
teeth: true,
threat: 'low',
__proto__: Animal
};
var Shark = {
life: 5,
teeth: true,
threat: 'extreme',
__proto__: Fish
}
debugger;
}();
!function () {
var Being = function () {
this.life = 1;
this.move = function () {
console.log('glide');
}
};
var Animal = function () {
this.inhabbits = 'terrain';
this.move = function () {
console.log('run');
}
this.__proto__ = new Being();
};
var Fish = function () {
this.inhabits = 'water';
this.tail = true;
this.move = function () {
console.log('swim');
};
this.__proto__ = new Being();
};
var Cat = function () {
this.life = 2;
this.tail = true;
this.teeth = true;
this.threat = 'low';
this.__proto__ = new Animal();
};
var Shark = function () {
this.life = 5;
this.teeth = true;
this.threat = 'extreme';
this.__proto__ = new Fish();
}
var Sissy = new Cat();
var Jaws = new Shark();
debugger;
};
!function () {
var Being = function () {
this.life = 1;
this.move = function () {
console.log('glide');
}
};
var Animal = function () {
this.inhabbits = 'terrain';
this.move = function () {
console.log('run');
...