typeof null ======》"object"

We know the value of typeof null is object, then why value typeof null is object of it.

"You do not know javascript" wrote:

This principle is, different objects are represented as binary at the bottom, in the words of jsvascript if the top three are binary 0 would represent objects, and binary null is 0, then the top three naturally 0, it is considered it is the object, so typeof null returns the object.

Guess you like

Origin www.cnblogs.com/yxfboke/p/11445722.html