JavaScript Advanced Programming--reference types

Source: Internet
Author: User

  objects are referred to as reference type values in JavaScript , and there are built-in reference types that can create specific objects:

      1. The reference type is similar to the class of the traditional object-oriented program design, but the implementation is different;
      2. object is an underlying type, and all other types inherit basic behavior from object.
      3. The array type is an ordered list of values and also provides the ability to manipulate and transform those values.
      4. The date type provides information about dates and times, including calculation functions related to information.
      5. The regexp type is an interface that ECMAScript supports regular expressions and provides the functionality of some regular expressions.

The function is actually an instance of the Fucntion type, so the function is also an object, and this is where JavaScript is most characteristic, because functions are objects, so functions have methods that can be used to enhance their behavior.

Because of the basic wrapper type , the basic type in JavaScript can also be accessed as an object class , with three basic wrapper types: Boolean, number, String:

      1. Each wrapper type is mapped to the base type with the same name ;
      2. When you access a base type in read mode , you create an object of the corresponding basic wrapper type , which facilitates data manipulation
      3. Once the statement that operates the base type value is executed , the newly created wrapper object is immediately destroyed .

Before the code executes , there are two built-in objects in scope : Global and math. In most ECMAScript implementations, there is no direct access to the Global object Web browser to implement the Window object that assumes this role. Global variables and functions are properties of the global object. The Math object provides many properties and methods.

JavaScript Advanced Programming--reference types

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.