怎么没有输出结果呢,哪里错了呀
var arr=new Array();
for(var i=0,i<3,i++)
{
arr[i]=new Array();
for(var j=0,j<6,j++)
{
arr[i][j]=i*j;
document.write(arr[i][j]);
}
}
var arr=new Array();
for(var i=0,i<3,i++)
{
arr[i]=new Array();
for(var j=0,j<6,j++)
{
arr[i][j]=i*j;
document.write(arr[i][j]);
}
}
2019-03-16
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>二维数组</title>
<script type="text/javascript">
var myarr=new Array();
for(var i=0;i<3;i++){
myarr[i]=new Array();
for(var j=0;j<6;j++){
myarr[i][j]=i*j;
document.write("数组值为:"+myarr[i][j]+" ");
}
document.write("<br>");
}
</script>
</head>
<body>
</body>
</html>
举报