有没有一种方法可以_derive_null 而不是显式分配它?

Is there a way to _derive_ null rather than explicitly assigning it?

我听说 null 是一个必须声明的 (措辞松散),它不能以任何方式导出。 .. 我知道你可以通过像 [][0] 这样厚颜无耻的东西来获得 undefined。 JavaScript中null是真的没有办法推导出来吗?

还有许多其他表达式 return null 值,尽管在您的代码中使用 null 文字 是最简单的方法。这是一个(相当详尽的)示例集合:

null
Object.getPrototypeOf(Object.prototype)
/[]/.exec("")
"".match(/[]/)
JSON.parse("null")
new Date(NaN).toJSON()