The 1th Chapter JS Introduction
1.js consists of three parts, ECMAScript, DOM, BOM.
The 2nd chapter uses JS in HTML
1. Put the <script> tag in the end of the <body>, you can display the content of the page before loading the JS file, which is user-friendly.
The defer property of the 2.<script> tag indicates that the script is deferred until the page is parsed and executed, and async indicates that the table download script is loaded with HTML, equivalent to async.
Chapter 3rd Basic Concepts
1.js Everything is case-sensitive. The first digit of the identifier cannot be a number.
Five basic types of 2.js: undefined,null,boolean,number,string. A complex Type: object.
3.null is used to assign values to variables that are ready to be saved.
The 4.Boolean () function converts the value of any data type to a Boolean type. See P26
5. Any operation involving Nan is Nan,nan and Nan.
6. Bitwise operator: Bitwise NON (~), the negation code (the number of operands minus 1). Bitwise AND (&), the binary code is 1 returns 1. Bitwise OR (|), the binary code is 0 returns 0. Bitwise XOR (^), the binary code returns 0 as the same.
7. "+" for two strings is stitching, if one is not a string, it is converted into a string. "<" and other relational operators, if there is a number is a value, there is a not, then will not be converted to a numerical value.
8.null==undefined, but null===undefined returns false.
9. Parameters named in the function are not required and can be accessed using arguments[i]. You can use this to mimic overloading. P65
10. In the function, parameters that do not pass the value are automatically assigned to undefined.
JS Elevation Note 1-3 Chapter