how does an object knows about its parent in javascript
- by alter
Lets suppose I made a class called Person.
var Person = function(fname){this.fname = fname;};
pObj is the object I made from this class.
var pObj = new Person('top');
now I add one property to Person class, say lname.
Person.prototype.lname = "Thomsom";
now pObj.lname gets me "Thomson".
My question is that, when pObj didn't find the property lname in it, how does it know where to look for.