仅供参考!
<script> //创建数组 var arr = ['*', '##', "***", "&&", "****", "##*"]; arr[7] = "**"; //显示数组长度 alert(arr.length) var a = [0, 7, 2, 4] for (var i = 0; i < a.length; i++) { var b = a[i] document.write(arr[b] + '<br>') } </script>
<script> //创建数组 var arr = ['*', '##', "***", "&&", "****", "##*"]; arr[7] = "**"; //显示数组长度 alert(arr.length) var a = [0, 7, 2, 4] for (var i = 0; i < a.length; i++) { var b = a[i] document.write(arr[b] + '<br>') } </script>
2022-10-29
举报