How to turn this Pascal code into Javascript? [closed]

can u please help me turn this pascal code into a js code? i do not really know how to do that

begin
  readln(n);
  a:=1;
  for k:=1 to n do begin
    a:=k*a+1/k;
    writeln('k = ',k:2,'  a = ',a:10:2);
  end;
end.