打印了兩遍怎么回事?
<!DOCTYPE? HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>數組</title>
<script type="text/javascript">
?//創建數組
?var arr=['*','##',"***","&&","****","##"];
?arr[7]="**";
?//顯示數組長度
?alert("arr數組的長度是:"+arr.length);
?//將數組內容輸出,完成達到的效果。
document.write(arr[0]+"<br>");
document.write(arr[7]+"<br>");
document.write(arr[2]+"<br>");
document.write(arr[4]+"<br>");
</script>
</head>
<body>
</body>
</html>
2018-08-05
這樣寫 for 循環能遍歷出數組內容
2018-08-04
怎么用for循環打印這個圖案?
2018-08-04
為什么我的代碼不行?
2018-07-31
用for循環寫