Sunday, 1 September 2013

typeof (Array, null) returns object and typeof(null, Array) returns function

typeof (Array, null) returns object and typeof(null, Array) returns function

As the title says it all, typeof (Array, null) returns object and
typeof(null, Array) returns function. Why? Interview question.
It returns the type of second parameter.

No comments:

Post a Comment