JavaScript/Undefined:修订间差异
来自康健生活
无编辑摘要 |
|||
| 第5行: | 第5行: | ||
== 生成 == | == 生成 == | ||
{{ | {{Double-columns|<syntaxhighlight lang="javascript"> | ||
void 0 | void 0 | ||
void(0) | void(0) | ||
| 第22行: | 第22行: | ||
var undefined = [];</syntaxhighlight> 时,依然会被当作一个新定义的常量或者变量去在栈或者堆中进行存储。为一例外的是 <code>null</code>,<code>null</code> 没有实际的存储地址(指向 0000),所以会抛出错误。 | var undefined = [];</syntaxhighlight> 时,依然会被当作一个新定义的常量或者变量去在栈或者堆中进行存储。为一例外的是 <code>null</code>,<code>null</code> 没有实际的存储地址(指向 0000),所以会抛出错误。 | ||
{{ | {{Double-columns|<syntaxhighlight lang="javascript"> | ||
function foo(){ | function foo(){ | ||
var undefined = []; | var undefined = []; | ||