Object.prototype.toString.call() vs typeof Posted on 2017-07-05 | In Front-End | 可以从下面例子找到答案: 12345678910111213141516var toString = Object.prototype.toString;var strLit = 'example';var strStr = String('example');var strObj = new String('example');console.log(typeof strLit); // string console.log(typeof strStr); // stringconsole.log(typeof strObj); // objectconsole.log(strLit instanceof String); // falseconsole.log(strStr instanceof String); // falseconsole.log(strObj instanceof String); // trueconsole.log(toString.call(strLit)); // [object String]console.log(toString.call(strStr)); // [object String]console.log(toString.call(strObj)); // [object String]