Determining whether the attribute of an object comprising

hasOwnProperty: is used to determine whether an object has a property of an object or give your name. But note that this method can not check the object's prototype chain has a property, the property must be a member of the object itself. Format is as follows:

Js Code

1. object.hasOwnProperty (proName);

object.hasOwnProperty (proName);

Analyzing proName name is not an object or object attribute object.

Returns true, or false;

Guess you like

Origin blog.csdn.net/weixin_34010949/article/details/90851384