📜  对象是字符串 javascript 代码示例

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

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