Practical purpose property 'constructor'?

Can't realize where to practice to use this feature. For example, the absence of this field in the prototype object will not prevent for example to calculate what bird instanceof Animal, i.e., the prototype chain is defined correctly.
function Animal() {}
Animal.prototype = Object.create(null);
//uso, Animal.prototype no longer contains the properties constructor


function Bird() {}
Bird.prototype = Object.create(Animal.prototype);

var bird = new Bird();

bird instanceof Animal --> true


In General, I'm confused how to use this(constructor) property and why it is in fact necessary..
Enlighten me, comrades!
June 10th 19 at 15:52
2 answers
June 10th 19 at 15:54
Constructor contains a reference to a function that is called when you create a new object using the new operator.

function Bird() {
 // Code inside the function is a constructor Bird
console.log(this.constructor);
 console.log('Code is executed when you create a new Bird object');
}

let a = new Bird();

class Cat {
 constructor() {
 // The constructor body
console.log(this.constructor);
 console.log('Similarly, the code from above');
}
}

let b = new Cat();
June 10th 19 at 15:56
constructor is not a property
spoiler
spoiler
function A() {}
undefined
A. constructor
ƒ Function() { [native code] }

Find more questions by tags JavaScript