Is there a way to make sure the input for a property is a certain Type? In this example I want to check whether the new Lion has a mane. Is there a way to make sure that the 'mane' value is a Boolean, when creating a new Lion Object?
function Lion(height, weight, fur, purr, mane) {
Cat.call(this, name, height, weight, fur, purr);
this.name = 'Lion';
this.mane = mane;
};
var lion1 = new Lion('100cm', '250kg', 'beige', 'ROAAAAAAAAR!', true);