The underlying type and reference type in JS:
Base type:
1. Number
2, String
3, Boolean
4, Undefined
5, Null
Reference type (built-in object):
1. Type of Object
2. Array type
3. Date type
4, REGEXP type (literal notation:/[bc]at/i constructor method: New RegExp ("[Bc]at", "I") flags are: g/i/m instance method: Exec ("string to validate") match on the return of an array, matching does not return null)
5. Function type (internal properties: this, arguments; Function properties: length, prototype; Function method: Call (), apply ())
6. Basic Package Type (Boolean type, number type, String type)
7. Single built-in object (Global, Math)
(Note: Creating a reference type instance tends to have both a constructor method and a literal notation)
Second, BOM
Directory:
1. Window object
2. Location Object
3. Navigator Object
4. Screen Object
5. History Object
1. Window object
Dual role: JS accesses an interface and global object of the browser's window, and the variables and functions declared in the global scope become properties and methods of Window objects. The page is related to the <frameset>/<frame> of frames, each frame corresponds to a window (see JS Advanced programming)
browser window's location: Window.screenleft
Third, DOM
The This in JS
Global environment: this;//refers to the Window object;
Function call: foo (); This refers also to the Window object;
When called as an object method: Test.foo (); This points to the object itself test
When you use the call or Apply method on Function.prototype, the This in the function is explicitly set to the first argument of the function invocation.
In the constructor, this points to the newly created object itself.
JS Main knowledge Contour Note