To get a better insight into how JavaScript works, you must first understand the core ECMAScript of JavaScript. ECMAScript variables can be divided into original values and reference values
Original type: Undefined,number,string,boolean,null.
Determining the type of a variable using the typeof operator may return "undefined", "Boolean", "string", "number", "Object", "function"
The following is a reference fragment:
6
7
8
9 Window.alert (typeof StringType);
Window.alert (typeof Numbertype);
One Window.alert (typeof Booltype);
12
13
Window.alert (typeof null);
Window.alert (typeof Math);
</script>
It's a special place. The TypeOf operator returns "Object" for a null value. This is actually an error in the initial implementation of JavaScript and is then used by ECMAScript. Now, NULL is considered a placeholder for an object, which explains the paradox, but technically it is still the original value.
Undefined type
Undefined type only one value is undefined