I don't entirely understand how this works:
function inherit(C,P) {
var F = function () {};
F.prototype = P.prototype;
C.prototype = new F();
}
function Parent(){};
Parent.prototype.species = "human";
function Child(){};
inherit(Child, Parent);
var kid = new Child();
Parent.prototype.talk = function () {return "Hello there!"};
How does the kid object have the talk function? Doesn't the inherit function only give the Child "class" the prototype of the parent at the time you call the inherit function? How is it able to update it?