8.12.3 Get

2010-04-19

mixed [[Get]](P:String)

Fetch and return the [[Value]] for property P of object O. Note that [[Value]] an internal property of O. In the method, this refers to that object.

Code: (Abstract Ecma)
function [[Get]](){
var desc = this.[[GetProperty]](P);
if (desc === undefined) return desc;
if (IsDataDescriptor(desc)) return desc.[[Value]];
// IsAccessorDescriptor(desc) must be true...
var getter = desc.[[Get]];
if (getter === undefined) return getter;
return getter.[[Call]](this);
}

Basically, it checks whether O[P] is an accessor or data property. If it's a data property, simply return the value. Otherwise return the result of O[P][[Get]].call(O);