為什麼要用Object.prototype.toString而不是Function.prototype.toString或是它?這是和他們的toString解釋方式有關的。下面是ECMA中Object.prototype.toString的解釋:
When the toString method is called, the following steps are taken:
1. Get the [[Class]] property of this object.
2. Compute a string value by concatenating the three strings “[object “, Result (1), and “]”.
3. Return Result (2)