For this Question: You are given two constructor functions - <code>Animal</code> and <code>Reptile</code> where <code>Reptile</code> inherits from <code>Animal</code> (check the boilerplate code).
 
Currently, if you check the constructor property of objects instantiated from <code>Reptile</code> constructor, it would be set as <b>[[Function: Animal]]</b>.
You have to reset the constructor property for constructor function <code>Reptile</code> such that all objects instantiated from <code>Reptile</code> constructor have <b>[[Function: Reptile]]</b> as their <code>constructor</code> property.

<strong>Note - </strong>You don't need to output anything, just write code to reset the constructor property.A string <code>name</code> and a number <code>age</code>.The constructor property for an instance of <code>Reptile</code>.const name = "snake"
const age = 10

const reptile = new Reptile(name, age)
console.log(reptile.constructor) // prints <code>[Function: Reptile]</code>  on console

, I have written this Solution Code: function Animal(name, lifeSpan) {
  this.name = name;
  this.lifeSpan = lifeSpan;
}

function Reptile() {
  this.layEggs = function layEggs() {
    console.log("Reptile laid eggs.");
  };
}

Reptile.prototype = Object.create(Animal.prototype);

/** Do not make changes in the above code. Start writing your code here. */

Reptile.prototype.constructor = Reptile;
, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?