<!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.length);
document.write(arr[3]);
我没有设置arr[3]的索引,但是用document.wirte()屏幕上也能显示&&
有什么影响吗??
var arr=["*","##","***","&&","****","##"];定义数组时候已经有索引了