Question · JavaScript and TypeScript course · Module 1: JavaScript Basics
The JavaScript engine and frequently run code
What does a modern JavaScript engine (e.g. V8) do with a piece of code that runs very often ("hot" code)?
Answer options
- Removes it from memory to free space
- Compiles it while the program runs (JIT) into optimized machine code
- Sends it to a server to run
- Turns it back into HTML code
Show the answer
Correct answer:
- Compiles it while the program runs (JIT) into optimized machine code