function Food(eatable){ this.eatable = eatable || false; } //Bacon extends food function Bacon(eatable, cancerous){ Food.call(this, eatable); this.cancerous = cancerous || false; } Bacon.prototype = Object.create(Food); Bacon.prototype.constructor = Bacon; var baconStrip = new Bacon(true, false);