| 12345678910111213141516171819202122232425262728293031323334353637383940 | <!DOCTYPE html><html lang="en"><head>  <meta charset="UTF-8">  <meta http-equiv="X-UA-Compatible" content="IE=edge">  <meta name="viewport" content="width=device-width, initial-scale=1.0">  <title>Document</title></head><body>  <script>    var a = [1, 2, 3, 4, 5] // 数组里面包括索引 值 长度 array    var b = 1    var c = ['hahhah', 111, '123n']    console.log(c)    /* 数组里面 可以存放任何值 */    var d = new Array()    d[0] = 11    d[1] = 'xixi'    d[4] = 'hahah'    console.log(d)    //empty 空占位符    console.log(d[6])    // var f = [666, 777]    // d[2] = f[0]    // d[3] = f[1]    // console.log(d)    for (var i = 0; i < d.length; i++) {      console.log(d[i])    }  </script></body></html>
 |