//1 variant
var
ara0 = [[],[]];
ara0[0][0] = 1;
ara0[0][1] = 2;
ara0[0][2] = 3;
ara0[1][0] = 10;
ara0[1][1] = 20;
ara0[1][2] = 30;
//2 variant
ara1 = [[1, 2, 3], [10, 20, 30]];
function
funMake() {
for
(
i=0; i<2; i++) {
j=0; j<3; j++) {
document.write(ara0[i][j] +
' '
);
}
document.write(
'<br /><br />'
document.write(ara1[i][j] +
'<br />'
//1 variant var ara0 = [[],[]]; ara0[0][0] = 1; ara0[0][1] = 2; ara0[0][2] = 3; ara0[1][0] = 10; ara0[1][1] = 20; ara0[1][2] = 30; //2 variant var ara1 = [[1, 2, 3], [10, 20, 30]]; function funMake() { for(var i=0; i<2; i++) { for(var j=0; j<3; j++) { document.write(ara0[i][j] + ' '); } } document.write(''); for(var i=0; i<2; i++) { for(var j=0; j<3; j++) { document.write(ara1[i][j] + ' '); } document.write(''); } }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
funMake();