class food { constructor(){ this.eatable = true; } } //The bacon class extends the food object class bacon extends food{ constructor(cancerous){ this.cancerous = cancerous || false; super(); } } var baconStrip = new bacon(true);