undefined is undefined, and the value is undefinedwhen the variable is not assigned a value. "Missing value", that is, there should be a value here, but there is no definition.
underclared is a contaminated name, access to a variable that is not declared, throws an exception, and terminates execution.
null is an empty object reference. "No object", that is, there should be no value at all
undefined and null The in the IF statement is automatically converted to false , and the equality operator even reports the two equals directly. typeof undefined returns undefined, and typeof null always returns object (< Span style= "Background-color: #ffc9e4;" >typeof has six possibilities: "number ", " string "," boolean "," object "," "," undefined ")
false = = undefined; // false false null; // false null = = undefined; // true
(Window.foo | | (Window.foo = "Bar");
Question: What is the value of Window.foo? The "| |" Operation 5-15 essay has been recorded. If Window.foo is false, then window.foo= ' Bar ', where Window.foo equals global variable, but undefined, for undefined, actual | | Before the If judgment, undefined automatically to false;
Null,undefined,true,false, as well as = = and = =