Javascript objects have an internal property called [[Prototype]] for property lookup and inheritance.
When looking for an object property, javascript checks the object's own property first, if not found, it will continue with the object's [[Prototype]], if not found again, look for [[Prototype]] of its [[Prototype]] until reaching null or