Typically, when a new object is created using the "new" keyword, the __proto__ property of the newly created object points to the prototype property of the parent class. This can be verified with the following code:
function myfunc(){};
myfunc.prototype.name="myfunction";
var child= new myfunc();
child.__proto__=== myfunc.prototype ---> true
However, let's explore what happens when we modify the prototype of the parent function:
myfunc.prototype={};
child.__proto__=== myfunc.prototype ---> false
child.name ------> "myfunction"
If child.__proto__ doesn't point to myfunc.prototype, then where does it point in the object chain? Even more intriguing, how does it still have access to the "name" property of the myfunc class?