Question: Need this in Javascript: Make Giraffe inherit from Mammal by assigning Giraffe with a copy of Mammal's prototype and setting the Giraffe class' prototype constructor
Need this in Javascript:
Make Giraffe inherit from Mammal by assigning Giraffe with a copy of Mammal's prototype and setting the Giraffe class' prototype constructor to Giraffe's constructor function.
function Mammal() { // Mammal class constructor code }
function Giraffe() { Mammal.call(this); }
/* Your solution goes here */
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
