1. Script Tag location: General in the head tag, loading the page must wait for the page to download the corresponding JS before rendering the interface;
Workaround 1. Place the body tag inside 2. Or use Window.onload=function ({});
2 Case-sensitive: A special keyword that indicates a null value. JavaScript is case-sensitive, so null and NULL, NULL, or other variables are completely different
3 identifier: Function name, variable, property name, or parameter of the function
1. Alphanumeric underlined dollar sign $, 2 first character must be letter, underscore, or $;
4 Note 1. Single-line comment//;2 Multiline comment/* content */statement end with a semicolon identifier;
The 5 variable JS variable is loosely typed to hold any type of data; definition: use var A; Use const to define read-only constants;
6 Data Type 1 Boolean value: Ture false;
2 number numeric type for example: 42 or 3.14159.
3 String type For example: "Howdy"
4 Object Type
5 NULL
6 undefined undefined variable or only unassigned;
The typeof operator is not a function; You can determine the data type of the variable
1.undefined----variable undefined or undefined
2.boolean---boolean value
3.string--String type
4.number--Value
5.object--Object or null
6.function--function
7 1 NaN judgment with isNaN (); alert (Nan==nan); return false;
2 string containing the Var lang= ' Java ' in single or double quotation marks; lang=lang+ ' script ';
Two ways to convert a value into a string
1 toString (); null and undefined; without this method; Usage: var num=10;alert (num.tostring ());
2 String (); The conversion rule if the method is called by the ToString () method, if NULL returns NULL, if undefined returns undefined;
8object type
Creation of objects
1 var obj= new Object (); If you do not pass parameters, you do not need to use parentheses;
9 Common Operators && | | ! = = = = = = and three mesh operations
JavaScript Advanced compilation Notes Chapter II, chapter III