📌  相关文章
📜  如果变量是字符串 javascript 代码示例

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

代码示例3
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"