JSFiddle - React, Tailwind, and code Playground
by basarat
HTML
<style>
html, body {
width: 100%;
height: 100%;
font-family:'Lucida Console';
background: #575757;
color: white;
margin: 0px;
overflow-y: hidden;
}
#console {
width: 95%;
height:90%;
padding: 10px;
overflow-y: auto;
}
#console div {
margin-top: 5px;
}
</style>
<div id="console"></div>
<script>
var panel = document.querySelector("#console");
var print = function(m) {
var newline = document.createElement("div");
newline.innerHTML = "> " + JSON.stringify(m);
this.panel.appendChild(newline);
};
</script>
JavaScript
function Animal() {}
Animal.prototype.walk = function () { print('walk') };
function Bird() {}
Bird.prototype.__proto__ = Animal.prototype;
var animal = new Animal();
var bird = new Bird();
print(animal.constructor == Animal);
print(bird.constructor == Bird);