var str = 'asdf';
var str1 = new String('asdf');
typeof str;//"string"
typeof str1;//"object"
Object.prototype.toString.call(str); //"[object String]"
Object.prototype.toString.call(str1); //"[object String]"
综上所述,判断是否为字符串使用下边的最保险
Object.prototype.toString.call(str) === "[object String]"
Object.prototype.toString.call("js") == "[object String]"
typeof "js" == "string"
!!"js".substr == true