This is the eighth in a series of posts I’m writing that aims to provide concise, understandable answers to JavaScript-related questions, helping me better understand both foundational concepts and the changing landscape of language updates, frameworks, testing tools, etc.
What’s a JavaScript Engine?
JS engines interpret and execute JavaScript code, usually for a web browser (since JS was created to run in the browser). They are written in lower-level languages such as C++ and C.
An engine must receive the specific version of JavaScript that it has been built to interpret. (There are several versions of JavaScript, as the language becomes updated and optimized for development. The most recent version is ES2017, which can be transpiled to an earlier version of JS in order to be run by a JS engine.)
Browsers have an increasing need to efficiently interpret JS code, because web applications more heavily rely on Javascript, not just to run a few scripts, but as their framework language. While popular modern browsers all have JS engines, there’s still a lot of competition among them to have the fastest engine that can generate the most optimized code.
Examples of JS Engines
- V8 (Chrome)
- Spidermonkey (Mozilla)
- JavaScript Core (Safari)
- Chakra (IE)
Resources
- A Guide to JavaScript Engines for Idiots
- Wikipedia – JavaScript Engine
- Wikipedia – List of ECMAScript Engines