为什么加上if这段语句提交就会直接卡死
<!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] = "**";//创建数组
document.write("数组长度:"+arr.length+'<br>');//显示数组长度
var i;
for(i=0;i<6;i=i+2){//将数组内容输出,完成达到的效果。
document.write(arr[i]+'<br>');
if(i=0)
document.write(arr[7]+'<br>');
}
</script>
</head>
<body>
</body>
</html>