Sample code for defining strings in javascript
- 2020-03-30 01:00:46
- OfStack
<html>
<head>
<title>javascript The definition of a string in </title>
<script>
//Define string
//The first kind of
var str = new Array();
alert(str);//Null character
//The second,
var str2 = new Array("hello");
alert(str2);//hello
//The third kind of
var str3 = "hello";
alert(str3);//hello
</script>
</head>
<body>
</body>
</html>