< ;title>Definition of string in javascript
<script> <br>//Definition of string<br>//First type<br>var str = new Array(); <br>alert(str);//Empty character<br>//Second type<br>var str2 = new Array("hello"); <br>alert(str2);//hello <br>//Third type The kinds of <br>/* <br>String objects can be created explicitly using string literals. <br>String objects created in this way (in standard string form) are handled differently from String objects created using the new operator. <br>All string literals share a common global string object. If you add an attribute for a string literal, it is available to all standard string objects: <br>*/ <br>var str3 = "hello"; <br>alert(str3);//hello <br> </script>