typeof(undefined) == 'undefined'
typeof(null) == 'object'
typeof("") == 'string'
typeof(0) == 'number'
typeof(false) == 'boolean'
typeof(null) == 'object'
typeof("") == 'string'
typeof(0) == 'number'
typeof(false) == 'boolean'
我的理解,
null 存在于栈中,但是值为空
undefined 表示改引用不存在于栈中
栈:在此处用来保存堆内对象的地址
在C#中,undefined的引用在编译时会报错,未声明变量
(声明会在栈中为变量生成一段内存空间,值类型:保存值,引用类型:保存它在堆中的地址);