The data types listed in MSDN for javascript are Number, String, Boolean, Object, Array, Null, Undefined. However, when you execute typeof function, its type is a function.
typeof function
Why is this so, and what is the definition of a data type?
Functions are just objects in JavaScript. But the difference lies in the internal property [[Call]]that distinguishes them from ordinary objects. When typeofused against an object, and if it finds a property [[Call]], it returns a String function.
[[Call]]
typeof
This behavior can be found in the ECMA specification for typeof.