typeof(undefined) == 'undefined'
 
typeof(null== 'object'
 
typeof(""== 'string'
 
typeof(0== 'number'
 
typeof(false== 'boolean'

 

我的理解,

null  存在于栈中,但是值为空

undefined 表示改引用不存在于栈中

 

 

栈:在此处用来保存堆内对象的地址

 

 

在C#中,undefined的引用在编译时会报错,未声明变量

(声明会在栈中为变量生成一段内存空间,值类型:保存值,引用类型:保存它在堆中的地址);

相关文章:

  • 2022-02-24
  • 2021-06-05
  • 2022-01-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
相关资源
相似解决方案