Undefined
Undefined
类型只有一个值,即特殊的undefined
;对未初始化和未声明的变量执行 typeof 操作符都返回了
"undefined"
值;null
和undefined
值没有toString()
方法,null
和undefined
可以使用String()
转型函数来返回字面量;实际上,
undefined
值是派生自null
值的;null == undefined; // true String(undefined); // "undefined"
Last updated
Was this helpful?