123456789101112131415161718192021222324252627 |
- <!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 = [0,1,6,3,4] //数组当中的第一个数字 索引为0
- // console.log(a)
- var b = ['hahahah',true,123]
- console.log(b)
- var a = new Array()
- a[0] = 'xixixi'
- a[3] = 'hehehe' //empty 空占位
- console.log(a)
- for(var i=0;i<b.length;i++){
- console.log(b[i])
- }
- </script>
- </body>
- </html>
|