I've this code:
var Parent = function(){};
var Child = function(){};
function inherit(C, P){
C.prototype = new P();//received a pointer to Parent
C.prototype.test = function(){};
}
inherit(Child, Parent);
console.log(new Parent);//Object {}
console.log(new Child);//Object {test=function()}
Now i've a question, if C.prototype received a pointer to Parent in my inherit function, why my "console.log(new Parent)" doesn't show like this: "Object {test=function()}" to Parent and "Object {}" to Child?