Dmitry Baranovskiy's blog (creator of Raphael) says that there are only 6 types in Javascript:
Object, Number, String, Boolean, Null, and Undefined.
Each can easily be checked via (for example):
Object.prototype.toString.apply(undefined) //"[object Undefined]"
But what about:
Object.prototype.toString.apply(new Date()) //"[object Date]"
Object.prototype.toString.apply(/a/)//"[object RegExp]"
...and Array, Functions also...
Are they different? Why are they not mentioned?
PS:
Is it related to the less-specific check like:
>>typeof [] //"object" ?
[Object.prototype.toString.apply]is not the right method for type checking ?)