Web Second Stage Java Script

Source: Internet
Author: User

Chapter One: Overview of Java Script

1. WEB Definition: HTML structure, CSS style, Java Script behavior.

2, Java Script composed of three parts: (1) core (Ecmasript)

(2) Document Object Model (DOM)

(3) browser model (BOM)

3. Features of Java Script: (1) Explanatory language

(2) Object-based

(3) Cross-platform

(4) The role of a wide range of areas

Chapter Two, the basic syntax of Java Script:

1, identifiers: Refers to variables, arrays, functions, a name.

2, hard Requirements Rules: (1) is composed of numbers, underscores, $, but can not use the beginning of the number.

(2) Prohibit the use of the ES inside the keywords and reserved words.

(3) to distinguish case.

3. Soft requirements: You can know what this identifier means by the name of the identifier.

4, naming rules: (1) Big hump: That is, the first letter of each word is capitalized, for example: UserName

(2) Small hump: The first letter in lowercase, followed by the first letter of the word capitalization, for example: UserName

5, ES inside the Note: (1) Single-line comment: two slash

(2) Multiline Comment:/* start with */end

6, Strict mode: In order to reduce the ambiguity of grammar, and to be able to parse faster.

7, the keyword: ES inside the predefined identifiers, the name of the time can not be used keywords.

8, reserved word: The current version is not a keyword, but it is likely that the next version will become a keyword.

9, variable concept: stored data can be changed.

10. Keyword declaring variable: var let const

11. Omission statement: (1) The variable is not declared, but it is directly used

(2) Missing statements are not supported in strict mode

(3) In JS, all variables can be declared with the Var let const

(4) Although it is possible to store any data type in the same variable, it is not recommended. Because this will affect the efficiency of the resolution

12, variable promotion (emphasis): (1) is to promote the declaration of the variable to the top of the current scope

(2) using VAR to declare variables is not recommended

(3) There is no variable promotion using let or const declarations

14. var declares a variable that does not have a block-level scope: (1) block-level scope: A separate scope is generated for the curly braces.

(2) Let and const have block-level scopes

15. JS data type (very important): (1) Basic data type: non-detachable

(2) Reference data type: can be split

(3) Common basic data types: Number numeric, string string, null null, undefiend undefined, symbol symbol

(4) Commonly used reference data types: array arrays, object objects

16. Undefined Undefined data type: Only one value of this data is his own Undefined

17 NULL NULL data type: Only one value of this data is his own null

18. Boolean Boolean data type: Only two values True True, false false.

19, Number numeric data type: integers, real numbers (decimals).

(1) Integer: Positive integer, negative integer.

(2) about integers having different binary:<1> binary: Ob

<2> octal: O

<3> 16 binary: OX

(3) Real numbers: That's our common decimal.

There are two ways to represent a <1> real number: decimal type, exponential type

<2> can view the maximum and minimum values supported in ES via Min_value and Max_value

                  

            

      

Web Second Stage Java Script

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.