javascript--Basic Knowledge--object

Source: Internet
Author: User

Object objects are the parent of all objects in JavaScript, and all of its methods and properties are available in all other objects. Provides functionality common to all JavaScript objects. Of course , these methods can be redefined in user-defined objects, and JavaScript will call these methods at the appropriate time.

Property:

description

__proto__ Property

Specifies the prototype for the object. Only IE11 supports

constructor 

Specifies the function that creates an object.

Prototype

Returns a reference to the prototype for the object's class.

Method:

Function

Describe

Object.create

Creates an object that has the specified prototype and optionally contains the specified property.

Object.defineproperties

Adds one or more properties to an object, and/or modifies the attributes of an existing property.

Object.defineproperty

Adds an attribute to an object or modifies an attribute of an existing property.

Object.freeze

Prevents modifying the attributes and values of existing properties and prevents the addition of new properties.

Object.getownpropertydescriptor

Returns the definition of a data property or accessor property.

Object.getownpropertynames

Returns the name of the object's properties and methods.

Object.getprototypeof

Returns the prototype of the object.

Object.isextensible

Returns a value that indicates whether a new property can be added to an object.

OBJECT.ISFROZEN 

true if Existing property attributes and values cannot is modified in an object and new properties cannot being added to the object. " If you cannot modify the attributes and values of an existing property in an object, and you cannot add a new property to the object, return   true.

Object.issealed

Returns true if the attributes of an existing property cannot be modified in the object, and a new property cannot be added to the object .

Object.keys

Returns the name of an enumerable property and method for an object.

Object.preventextensions

Prevents new properties from being added to the object.

Object.seal

Prevents the modification of attributes of existing properties and prevents the addition of new properties.

javascript--Basic Knowledge--object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.