当前位置: 代码迷 >> 综合 >> javascript中的undefined,null,typeof
  详细解决方案

javascript中的undefined,null,typeof

热度:59   发布时间:2024-01-16 16:25:43.0

1.

var a = "ssss";

var b;

b==undefined ; //这个为true

typeof(b)=="undefined" //这个为true

//不能写成b=="undefined";这个永远为false.

 

 

2.

null

跟undefined一样性质。

  相关解决方案