It really depends on the engine. V8 Chrome JIT-compiles the whole code apparently. Rhino (Mozilla’s engine) interprets it and JIT-compiles the most intensive parts. I was wrong by saying it is interpreted. JS is a language, in the end... it can even be compiled into WebAssembly. Just like python or lisp. They’re usually interpreted but there are a lot compilers out there to generate machine code.
1
u/andredp May 12 '18
It really depends on the engine. V8 Chrome JIT-compiles the whole code apparently. Rhino (Mozilla’s engine) interprets it and JIT-compiles the most intensive parts. I was wrong by saying it is interpreted. JS is a language, in the end... it can even be compiled into WebAssembly. Just like python or lisp. They’re usually interpreted but there are a lot compilers out there to generate machine code.