The object in JS

Source: Internet
Author: User

An object belongs to a composite data type that can hold properties of several different data types in an object.

Classification:

1. Built-in objects: objects defined by the ES standard can be used in the implementation of any ES.

2. Host object: The object provided by JS's running environment, which is mainly referred to by the browser.

3. Custom objects: Objects created by developers themselves.

object's Operation:

1. Create object: The function called with the New keyword is the constructor constructor, the constructor is the function that is used to create the object, and when you check an object with TypeOf, object is returned.

2. Add property to object: Syntax: Object. property name = attribute value;

3. Read the object's properties: Syntax: Object. Property name

(If you read an attribute that is not in the object, it will return udefined)

4. Modify the object's property value: Syntax: Object. property name = attribute value (new value);

5. Delete the object's properties: syntax: Delete object. property name;

The object in JS

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.