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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!