Jump to content

Typeof


Drycodez

Recommended Posts

Here's what I got from Mozilla's Developer Network:https://developer.mozilla.org/en/JavaScript/Reference/Operators/Special/typeof#null

In the first implementation of JavaScript, JavaScript values were represented as a type tag and a value. The type tag for objects was 0. null was represented as the NULL pointer (0x00 is most platforms). Consequently, null had 0 as type tag, hence the bogus typeof return value. (reference needed)This is planned on being fixed in the next version of ECMAScript (which will be available via an opt-in). It will result in typeof null === 'null'.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...