Mark As Completed Discussion

One Pager Cheat Sheet

  • A JavaScript engine reads, translates and executes code and is embedded in JavaScript runtime environments such as browsers, Node.js or JRE.
  • No, this statement is false: the JavaScript engine's execution of the code is the final stage that actually runs it.
  • The JavaScript Engine works with a Parser, an Abstract Syntax Tree (AST), an Interpreter, a Profiler, a Compiler, and optimized code, as well as a Call Stack and Memory Heap, to process code quickly and efficiently.
  • The Profiler watches the code and makes optimizations, improving the performance of the JavaScript Engine.
  • A runtime is a program that extends the JavaScript engine and provides additional functionalities, such as relevant APIs to interact with the outside world, so as to build JavaScript based software.
  • The JavaScript Runtime consists of Web APIs, the Callback queue, and the Event loop, which together enable JavaScript to run asynchronously by scheduling callbacks from the Web APIs to be added to the stack.
  • The Event Loop monitors the Callstack and Callback Queue and allows asynchronous execution of callback functions by continuously pushing them onto the Callstack.
  • The JavaScript Engine analyzes and prepares the code for execution, while the Runtime executes the code and manages the queues that are associated with code execution.
  • No, the JavaScript Engine is responsible for syntactic analysis of the source code and creating a machine understandable code, while the Runtime is used for executing the code.