JavaScript authoritative Guide (6)-Objects

Source: Internet
Author: User

JavaScript objects can inherit properties from an object called a prototype, and this " Archetypal inheritance " (Prototypal inheritance) is a core feature of JavaScript. In addition to strings, numbers, true, false, NULL, and undefined, the values in JavaScript are objects. Object is mutable, you can add or delete properties of the object, manipulating the object by reference , not by value.

The common use of objects is the Create object and set (set), find (query), delete (delete), detect (Test), enum (Enumerate) object properties.

An attribute with the same name cannot exist in an object, the property value can be any JavaScript value, or (ECMASCRIPT5) can be a getter or setter function (or both). In addition, each property has some associated values, called attribute characteristics , such as writable (writable), Enumerable (enumerable), configurable (configurable ).

In addition to containing attributes, each object also has three related object attributes:

object's prototype (prototype): points to another object whose properties inherit from its prototype object.
Object class: IsA string that identifies the object type.
Extended markup for object (Extensible Flag): Indicates whether a new property can be added to the object (in ECMAScript5).

Three types of JavaScript objects and two types of properties:

built-in objects (native object): An object or class defined by the ECMAScript specification. such as arrays, functions, dates, and regular expressions.
Host Object (Host object): defined by the host environment embedded by the JavaScript interpreter (for example, Web browser). such as HtmlElement. The host object can also be used as a built-in object.
Custom Objects (User-defined object): An object created by the running Javascrip code.
own Property (Own property): An attribute that is defined directly in an object.
Inheritance Properties (Inherited property): An attribute defined in the object's prototype object.

JavaScript authoritative Guide (6)-Objects

Related Article

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.