Javascript - why this loop ? instance->(prototype property->constructor property->function object->constructor property)
<p>I am unable to understand this loop behavior of the javascript.</p>

<p>Can someone tell me why was it designed in this way?
Is there any real use case of this behavior?</p>

<p>why this loop? {
Newly created instance inherits properties from the prototype property of the constructor function object.
prototype property of the constructor function is an object that keeps constructor property.
constructor property is equal to the constructor function object.
Again constructor function object keeps prototype property.
}</p>

<p>instance1---inhertis(keeps)-->Prototype property of func()-->keep constructor property-->function object func-->keep prototype property.</p>

<pre><code>var func = function(){};
var construct = func.prototype.constructor;

console.log(construct === func); //true

var instance1 = new func();
</code></pre>

<p>Updated: Even if in between i assigned something else, instanceof always returns true.</p>

<pre><code>var func1 = function(){};
func1.prototype.constructor = 1;

var instance1 = new func1();
console.log(instance1 instanceof func1); //true


var func2 = function(){};
func2.prototype.constructor = 0;

var instance2 = new func2();
console.log(instance2 instanceof func2); //true
</code></pre>

<p>Sorry to ask 2 question in 1 but both may be related.</p>
