JavaScript: JS objects _Array

<! DOCTYPE HTML>
<HTML>
    <head>
        <Meta charset = "UTF-. 8">
        <title> </ title>
        <Script>
            / * 1. Create
                1.var arr = new Array (element list);
                2. var arr = new array (default length);
                3.var ARR = [element list];
            2 method:
                the Join (): separator
                Push (): add a new end of the array element, and returns the new length
            3. properties:
            4. features:
                1.js, the variable array element type.
                In 1.JS, variable length array elements.
            
            * /
            
            
            
            // Create an embodiment 1.
            Var the Array of arr1 new new = (l, 2,3);
            var arr2 is the Array new new = (. 5);
            var ARR3 = [1,
            
            document.write(arr1 +"<br>");
            document.write(arr1[0] +"<br>");
            document.write(arr1[1] +"<br>");
            document.write(arr1[2] +"<br>");
            document.write(arr2 +"<br>");
            document.write(arr3 +"<br>");
        </script>
    </head>
    <body>
        
    </body>
</html>

Guess you like

Origin www.cnblogs.com/JJJHaoran/p/12670723.html