📌  相关文章
📜  javascript 检查 var 是否为字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:09.046000             🧑  作者: Mango

代码示例4
var booleanValue = true; 
var numericalValue = 354;
var stringValue = "This is a String";
var stringObject = new String( "This is a String Object" );
alert(typeof booleanValue) // displays "boolean"
alert(typeof numericalValue) // displays "number"
alert(typeof stringValue) // displays "string"
alert(typeof stringObject) // displays "object"