电话
13363039260
全局方法 String() 可以将布尔值转换为字符串。String(false) // 返回 "false"String(true) // 返回 "true"Boolean 方法 toString() 也有相同的效果。false.toString()......
constructor 属性返回所有 JavaScript 变量的构造函数。"John".constructor // 返回函数 String() { [native code] }(3.14).constructor // 返回函数......
你可以使用 typeof 操作符来查看 JavaScript 变量的数据类型。实例typeof "John" // 返回 stringtypeof 3.14 // 返回 numbertypeof NaN ......