object.ownproperty code example
Example 1: how reliable is js hasownproperty
o = new Object();
o.propOne = null;
o.hasOwnProperty('propOne'); // returns true
o.propTwo = undefined;
o.hasOwnProperty('propTwo'); // returns true
Example 2: hasOwnProperty.call js
var foo = {
hasOwnProperty: function() {
return false;
},
bar: 'I belong to foo'
};