一、javascript:typeof 返回的是字符串,有六种可能, "number"、"string"、"boolean"、"object"、"function"、"undefined" 是否为字符串:"", "false", "0", "Hello World"var isString = function(obj){ return typeof obj === 'string'; } var isString = function(obj){ return Object.prototype.toString.call(obj) === '[object String]'; };是否为布尔值:false, truevar isBoolean = function(obj)