Pas2JS pascal source code
var a := new Integer[3, 5];
procedure WriteLnA;
var
x, y : Integer;
begin
for y:=0 to 4 do begin
for x:=0 to 2 do begin
WriteLn(a[x, y]);
WriteLn(',');
end;
WriteLn('');
end;
end;
WriteLnA;
for var x := 0 to a.High do
for var y := 0 to a[x].High do
a[x, y]:=x*10+y+1;
WriteLnA;
for var x := 0 to a.High do
for var y := 0 to a[x].High do
a[x, y]:=a[x, y]*2;
WriteLnA;
{ <<< CONSOLE OUTPUTS >>>
0,0,0,
0,0,0,
0,0,0,
0,0,0,
0,0,0,
1,11,21,
2,12,22,
3,13,23,
4,14,24,
5,15,25,
2,22,42,
4,24,44,
6,26,46,
8,28,48,
10,30,50,
}
var a = [];
var x$1 = 0;
var y = 0;
var x$2 = 0;
var y$1 = 0;
function WriteLnA() {
var x$3 = 0;
var y$2 = 0;
for(y$2=0;y$2<=4;y$2++) {
for(x$3=0;x$3<=2;x$3++) {
WriteLn(a[x$3][y$2]);
WriteLn(",");
}
WriteLn("");
}
};
a = $NewArrayFn(3,function (){return $NewArray(5,0)});
WriteLnA();
var $temp1;
for(x$1=0,$temp1=a.length;x$1<$temp1;x$1++) {
var $temp2;
for(y=0,$temp2=a[x$1].length;y<$temp2;y++) {
a[x$1][y]=(x$1*10)+y+1;
}
}
WriteLnA();
var $temp3;
for(x$2=0,$temp3=a.length;x$2<$temp3;x$2++) {
var $temp4;
for(y$1=0,$temp4=a[x$2].length;y$1<$temp4;y$1++) {
a[x$2][y$1]=a[x$2][y$1]*2;
}
}
WriteLnA();