JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>

JavaScript

function Plant(name, colour) {
    this.name = name;
    this.colour = colour;
}

Plant.prototype.print = function () {
    return "I'm a " + this.name.toLowerCase() + " and I'm " + this.colour.toLowerCase() + ".";
}

var mango = new Plant("Mango", "Orange");
console.log(mango.constructor);

function Fruit(type, isOrganic) {
    this.type = type;
    this.isOrganic = isOrganic;
}
Fruit.prototype = new Plant("Orange", "Orange");

var orange = new Fruit("staples", true);
console.log(orange.constructor);