In his Eloquent Javascript, Haverbeke claims that (page 16):
\"In a JavaScript system, most of this data is neatly separated into things called va
You need to be careful when talking about types in javascript. Values have a Type, which may be one of the following:
Perversely, the value returned by the typeof operator is not the Type, it's a string that is the same as the Type for most values, but is different for:
[[Call]]
returns function, even though its Type is ObjectSo the bottom line is that the Type of a function is Object, but typeof someFn
returns function
.