1. False, 0, "", Undefined, NULL in Boolean environment as false;
Null is treated as 0 under the numerical environment;
Undefined is considered as NaN under numerical environment;
2.NaN cannot participate in comparison, Nan = = Nan result false
3. (1) non-changing value: Number, String, Boolean, undefined, null
Features: The value 12 is stored in the stack, when a variable is re-assigned to the value of 13 o'clock, the system will change the name of the original address to the original number, the number of the next address to the name of the variable, and the re-assigned value of 13 to the next address, and the original number of the address stored in the original value of 12,
(2) Citation: array,objict, function
Features: The referenced address is stored in the stack, and the corresponding value is stored in the heap, var a = [0,1]; var B = [+]; If you make a = B; The end result is that both A and B point to the address of a, and the number of elements in a B is exactly the same as the size.
The 4.web standard (a standard for the one), structure, style, behavior separation, CSS and JS are usually introduced externally.
5. When executing the code, CSS takes the form of asynchronous parsing of HTML code while parsing the CSS code while performing
JS using synchronous mode, when the resolution encountered JS code or JS introduced, will be the full load of JS code parsing will be parsed after the HTML and CSS code.
6.&& and | | Small differences from other languages
1 && 2, first execute 1, if 1 is false, then return false directly, no longer see 2;
If 1 is true, then look at 2 and finally return a Boolean value of 2.
1 | | 2, the first execution 1, if 1 is true, then directly return true, no longer see 2;
If 1 is false, then look at 2 and finally return a Boolean value of 2.
Precautions: For example (i). 1 && 2 return 2,
(b). 0 && 2 returns 0.
|| In the same way as &&, if the participating judge is not a Boolean type or a logical expression, then 0, undefined, null, "" is judged as false, but the returned value is still not the original value, not the Boolean value that participates in the judgment.
7. +,-,/, *, = write code preferably with a space on both sides, so that the code conforms to the specification. For example: 1 + 2 = 3;
8. Declaring Variable Specifications:
(1) Use Var to declare almost all types of variables.
(2) Variable name: can only contain letters, numbers, _, dollar sign, and cannot start with a number; letters are case-sensitive.
JS Beginner Some of the error-prone knowledge points