——————————————————————————
<script type= "Text/javascript" >
Use the Array object's constructor array (), array object, which is a built-in object, and also provides a parameter that represents the initial length of the array
var arr001 = new Array (); Use the new statement to create an array of length 0
Arr001[0] = 1; The first element is a 1
ARR001[1] = 2; The second element is a 2
ARR001[2] = 3; The third element is a 3
Alert (' The value of the second element is: ' + arr001[1]);//subscript starting from 0
Create an array using the brackets
var arr002 = []; Use grand brackets to create, or initialize some data
Arr002[0] = ' a '; The first element is a
Arr002[1] = ' B '; The first element is a B
ARR002[2] = ' C '; The first element is a C
Alert (' The length of the array: ' + arr002.length ');//The length of the array can be dynamically increased
</script>
————————————————————————————
Objects and arrays-multiple ways to create arrays