<script> //将数组里面的元素挨个打印 var a1=['Q','s','c',1,4,9,'奥特曼','篮球']; console.log(a1[0]); console.log(a1[1]); console.log(a1[2]); </script>
<script> //使用for循环打印 for(var i=0;i<a1.length;i++){ console.log(a1[i]); } </script>
//使用while打印 <script> var i=0; while(i<a1.length){ console.log(a1[i]); i++ } </script>