<!--Make a HTML Project using Array-->
<! DOCTYPE html>
<html>
<head>
<title>Array</title>
</head>
<body>
<script>
var i,j,row,column;
row=prompt("Enter The number of rows");
column=prompt("Enter the number of Column");
var arr= new Array(row);
for(i=0;i<row;i++)
arr[i]=new Array(column);
for(i=0;i<row;i++){
for(j=0;j<=column;J++)
{
arr[i][j]=prompt("Enter value in matrix");
}
}
for(i=0;i<row;i++);{
for(j=0;j<column;j++){
document.write(arr[i][j]+" ");
}
document.write("<br>");
}
</script>
</body>
</html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter