Hi I created a class as below:
function Shape(){
this.x = 0;
this.y = 0;
}
Now in the Chrome console when I type Shape.prototype it has constructor property which on expanding has a prototype and __ proto __(dunder proto points to the Object Base and the chain ends here, I get this point.
But the prototype property upon expanding contains constructor property and this chain goes on and on (constructor to prototype and prototype to constructor) . Why is this happening?
Is it because that .prototype and .constructor keep pointing at each other or is there something else going on over here? can please someone explain.
Thanks in advance