These things are much more easier handled with an Interpreter or a Virtual Machine. Some bits of code don't get compiled, instead the interpreter calls an engine subroutine to take the actions described by the code. Theoretically, the JavaScript interpreter will read the first line first, which is cool coolness followed by a syntax error. Oh, so very, very true. So, JavaScript engines are designed leveraging best of the both approaches & developed the Just In Time(JIT) Compilation model. BTW: To know more about JIT you can read Lin Clarkss course on JIT. It could be compiled or interpreted. JavaScript is a lightweight interpreted programming language. Why does Jesus turn to the Father to forgive in Luke 23:34? Basic was the only other interpreted language in the top 10 for popularity in that day, but probably polluted by its association with Microsoft's Visual Basic. The interenet, and most especially the "web", has been an amazing evolutionary process. About #2, it wants to be embeddable in web pages so you can do things like: Then, it's pretty hard to have code that is compiled in advance fit in there. Before executing any expression, the interpreted has to find the value of the variables from the scope which was already there since execution context was created. Could very old employee stock options still be accessible and viable? A friend of mine has a search engine for phonebooks and other short strings. However, don't get over excited just yet. Why do so many people state that performance is not an issue anymore? For Example, the V8 engine, the engine that runs Google Chrome and NodeJS, compiles to native code internally: V8 increases performance by compiling JavaScript to native machine code before executing it, versus executing bytecode or interpreting it. Answer: JavaScript is an interpreted language, not a compiled language. JIT or just in time compilers are not specific to JavaScript. So basically you always need the interpreter installed in your environment, before you run any interpreted language; but compiled language applications can run directly once they are compiled. Bytecode is a special machine language native to . There are two ways you, a non-ancient-Greek speaker, could follow its directions. why is javascript interpreted rather than compiled +1 (760) 205-9936. Now that you know the difference lets talk about JavaScript. Did you add your