"JS Authoritative Guide Learning Summary-Chapter III types, values and variables"

Source: Internet
Author: User

Chapter III types, values, and variables

Content Essentials

I. Data type

1. Types of values that can be represented and manipulated in a programming language are called data types

The 2.JS data types fall into two categories:

Primitive types: Numbers, strings, and Boolean values

Object type

There are two special primitive values in 3.JS: null (NULL) and undefined (undefined)

4. Object: is a collection of attributes (property), each of which consists of a name/value pair.

5. Function: Another special object defined in JS. A function is an object that has executable code associated with it, runs executable code by calling a function, and returns the result of the operation.

6. Constructors:

If a function is used to initialize (using the new operator) a newly created object, we call it a constructor.

Each constructor defines a class (Class) object, in addition to the array class and function class, JS also defines the date (data) class that represents the Date object, and the regular (REGEXP) class defines the expression regular expression object. The error class defines objects that express run-time errors and syntax in the JS program.

The 7.JS interpreter has its own memory management mechanism that can automatically garbage-collect memory. This means that the program can create objects on demand, and programmers don't have to worry about destroying them and memory recycling. When there is no longer any reference to an object, the interpreter will know that the object is useless, and then automatically reclaim the memory resources it consumes.

"JS Authoritative Guide Learning Summary-Chapter III types, values and variables"

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.