- JS has only one numeric type, which is equivalent to double. (I do not know why, every time I hit a double input method will appear to tease than three words)
- Nan is a numeric value that can be used to detect Nan with isNaN (number)
- Infinity represents all values that are greater than a very large value
- JS has an object, math, which contains a set of methods that act on numbers.
- All characters in JS are Unicode, 16-bit
- JS has no character type, just create a string containing only one character.
- Backslashes, quotes, and control characters can be inserted into a string using escape characters, such as "A" = = = "\u0041"
- The string has a length property to represent the string, "Troy". Length is 5,touppercase () is uppercase
- Unlike many other languages, JS's code does not create new scopes, so variables should be defined in the head of the function, not in the code block. So the recommendation is to place the function at the beginning of the functions like the C language.
- Conditional judgments are listed as false values: false,null,undefined, empty string ' ', number 0, number Nan, and all other values are true, including true, "false"
- There are two types of loop statements, one for the normal for loop, and one for the in statement, which enumerates all the property names of an object. Remember is the property name Oh, not the property value, not the Property object.
- You can use the Obj.hasownproperty ("name") method to determine if obj has an object of this property.
- The throw of a try catch statement can throw any object, and the object we catch usually has a name and a message two properties
- Return can return any value, if not return value, default is undefined.
- Using typeof to get the type, a total of the following are returned: ' Number ', ' String ', ' Boolean ', ' undefined ', ' function ', ' object '. Returns ' object ' even if it is null or an array
"JS Review Notes" 01 Basic grammar