jsbook icon indicating copy to clipboard operation
jsbook copied to clipboard

typeof null

Open RubyLouvre opened this issue 9 years ago • 0 comments

1995年JS诞生时,根本没把null当作数据类型,而是Object的一种特殊值。下面是当年C源码,其中完全没考虑null。这就是typeof null === object的根本原因。

http://www.2ality.com/2013/10/typeof-null.html

RubyLouvre avatar Jan 23 '16 14:01 RubyLouvre