javascript is object has property?
hasOwnProperty() method The JavaScript object has a special method object. hasOwnProperty(propName) that returns a boolean that indicates whether object has a property propName . The property name exists in the object hero : thus hero. ... In simple words, the own properties are those defined directly upon the object.