Predefined object properties and methods

 

Object instance methods and properties
inherited properties object.constructor object, which points to the object constructor, which is generally used to determine the class of an object

Whether object.hasOwnProperty (propertyName) whether the specified object property owned properties

Whether object.properytlsEnumerable (propertyName) whether the specified property enumerable

object.isPrototypeOf (o) determining whether the current object is the object prototype parameters

object.keys () Gets the current object attribute name its own set of enumerable

Object methods and properties of the object:
the Object.create (proto, descriptors) specifies an object prototyping, proto prototype, descriptors attribute descriptor

Object.definepropety (o, propertyName, descirptors) Property and Attribute added object descriptor

Object.defineproperties (o, descriptors) add new attributes to configure the object attribute descriptor (version a batch process)

Acquiring an object attribute descriptor specified property Object.getOwnPropertyDescriptor (o, propertyName)

Object.getOwnPropertyNames (o) of the object acquired its own set of attribute name

Object.getPrototypeOf (o) acquired object prototype object

Object.preventExtensions (o) that the object is not extended, i.e. not adding a new property of its own
Object.isExtensible (o) determining whether an object can add new attribute

Object.freeze (o) frozen object, the object can not be frozen refers to add a new property of its own, all have their own attributes can not be configured, and write
Object.isFrozen (o) to determine whether the object is frozen

Object.seal (o) a closed object, the object can not add a new closing means of their own attributes, not all attributes have its own configuration
whether Object.isSealed (o) determining the object is closed

Guess you like

Origin www.cnblogs.com/yangwenbo/p/11730538.html