boolean Object.prototype.hasOwnProperty(V:string|mixed)
Returns whether this value (after coercion to Object) has an own property named V.
Object.prototype.hasOwnProperty = function(V){
var P = ToString(V);
var O = ToObject(this);
var desc = O.[[GetOwnProperty]](P); // PD
return !!desc;
}
Note that P is converted to string first because it might throw an error. ToObject will also throw an error if this is undefined or null. To prevent issues with legacy code the order was maintained.