数据类型 :
基本数据类型:Number、String、Boolean、null、undefined
引用数据类型:Function、Object、Array
区别 :
undefined:声明变量但未对其加以初始化时,这个变量的值就是undefined。
null:定义了, 但是赋的值是空的。
a:声明但未定义(undefined)
b: 声明且定义为null
c: 未声明(c is not defined)
let a;
console.log(a);
let b = null;
console.log(b);
console.log(c);
ECMA 标准要求 null 和 undefined 等值判断返回 true
null == undefined // true
null === undefined // false