JavaScript Advanced Programming--Learn from scratch (3)

Source: Internet
Author: User
Tags hosting

Object Basics

1. OOP

2. Object Application

3. Type of Object

3.1 Local objects

ECMA-262T defines local objects (native object) as "objects provided by ECMAScript implementations that are independent of the hosting environment." In simple terms, a local object is a class ( reference type ) defined by ECMA-262.

They include:

    Object Function Array String Boolean

Number Date RegExp Error evalerror

Rangeerror referenceerror syntaxerror TypeError urierror

3.2 Built-in objects

ECMA-262 defines the built-in object (built-in object) as "all objects that are provided by the ECMAScript implementation, independent of the hosting environment , and appear when the ECMAScript program starts executing."

ECMA-262 only defines two built-in objects:Global and Math. built-in objects are also local objects .

In ECMAScript, there is no independent function, and all functions must be methods of an object.

encodeURI (): Does not encode special characters in URIs, such as colons, front slashes, question marks, and pound signs.

encodeURIComponent (): Encodes all non-standard characters it discovers. These two methods are used to encode the URI passed to the browser.

decodeURI ():

decodeURIComponent ():

      Eval (): The most powerful way to accept a parameter, which is the ECMAScript (or JavaScript) string to execute.

3.3 Host Objects

4. Scope

4.1 Public, protected, and private scopes

4.2 Static scopes are not static

4.3 keyword this

5. Defining classes or objects

6. Modify the Object

JavaScript Advanced Programming--Learn from scratch (3)

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.