hasownproperty problem code example
Example 1: javascript does object have property
var person = {'first_name': 'bill','age':20};
if ( person.hasOwnProperty('first_name') ) {
//person has a first_name property
}
Example 2: hasOwnProperty.call js
var foo = {
hasOwnProperty: function() {
return false;
},
bar: 'I belong to foo'
};