Question: javascript if an object has a property?
Answer: hasOwnProperty() method. The JavaScript object has a special method object. ...  in operator. The in operator propName in object also determines whether propName property exists in object . ...  Comparing with undefined. If you access a non-existing property from an object, the result is undefined . ...  Summary.