Whether a program is a compiler or an interpreter is determined by its input and output, not by the architecture of the program itself.
A compiler reads in source code written in a high level language and translates it to something else. Most often, compilers generate an executable program in a low level language, usually machine code. From there, all you need is the compiled executable to run the program; you only need the source code and compiler if you want to modify the program.
An interpreter also reads high level source code, but instead of generating an executable it executes the program as it parses. To run a program like this you'll always need a copy of the source code and the interpreter.
Compilers and interpreters are usually compiled, and in the case of compilers, the compiler is often used to compile itself (this is called bootstrapping). But that's just common practice. There's no practical reason why you couldn't write a compiler in an interpreted language.
As to what type of low level language your compiler should output, that depends on what architecture you want your executable to run on. More than likely you'll want to generate assembly language for your platform and then use a preexisting assembler to convert that to machine code.
The code you wrote simply translated the Pascal code into Javascript code. You could think of that as a type of compilation: you're compiling Pascal into Javascript so it can be run by a Javascript interpreter. If you're trying to write something that allows the user to run Pascal code in a web browser, for example, then you've got the right idea.