typeof null // "object" (因为一些以前的原因而不是'null')
typeof undefined // "undefined"
null === undefined // false
null == undefined // true
null === null // true
null == null // true
!null //true
isNaN(1 + null) // false
isNaN(1 + undefined) // true
"use strict";
var color="red";
function a(){
console.log(window.color);
console.log(this.color);
}
a();
//red
//报错
var color="red";
function a(){
console.log(window.color);
console.log(this.color);
}
a();
// red
// red