JavaScript is a language of the Web. This series of articles will talk about my observations learned during my decade of software development experience with JavaScript, and what mistakes developers generally make and what differences they should be aware of.
Part Three will focus in detail on JavaScript Engines. Before moving further let us look at the previous articles of the series:
Let’s start with Q&A:
Q: What is the difference between interpreted v/s compiled languages?
Ans:
Compiled: In compiled language, a compiler will translate the program directly into code that is specific to the target machine, which we call machine code. Then the computer will run the machine code on its own.
Interpreted: In an interpreted language the code is not directly run by the machine; there is another program which reads and then executes the code. This other program is known as the interpreter.
Q: Is Javascript an interpreted language or compiled language?
Ans:
Historically it was designed as interpreted language.
Javascript differs from traditional C, C++ lanauges. Javascirpt is JIT (Just-in-time) compiled. The reason behind this approach is for huge speed gains which modern Javascript engines provide.
Q: Which category of language Javascript belongs?
Ans: JavaScript is considered as a high-level language. It’s readable by humans easily.
Q: What is a a JavaScript engine?
Ans: It’s a program or library, which executes JavaScript code.
Evolution of JavaScript engines
The 1st JavaScript engine was created by Brendan Eich in late 1990s for Netscape. It was named SpiderMonkey, and was written in C++.
Since after then there were many engines launched. Here is the list of popular ones: