Normally when we create a new object using "new" keyword, actually the __proto__ property of the created object is pointing to the prototype property of the parent class. We can test this as below :
function myfunc(){};
myfunc.prototype.name="myfunction";
var child= new myfunc();
child.__proto__=== myfunc.prototype ---> true
But let's see what happens when I change the prototype of the parent function:
myfunc.prototype={};
child.__proto__=== myfunc.prototype ---> false
child.name ------> "myfunction"
So if child.__proto__ isn't pointing to the myfunc.prototype, so where it is pointing in objects chain? More important if it doesn't point to the myfunc.prototype, then how it has access to the "name" property of myfunc class?