Javascript Foundation Flashcards
What is an Interpreter?
It’s what runs the code line by line.
What is a Compiler?
A compiler translates code in one language to another language.
What is Babel?
Babel is a Javascript compiler that takes your modern JS code and returns browser compatible JS (older JS code).
What is Typescript?
Typescript is a superset of Javascript that compiles down to Javascript.
What is a JIT Compiler?
Git Compiler is an engine that merges the interpreter and compiler together.
What is Call Stack?
Call Stack is how the interpreter keeps track of the of its place in a script that has multiple functions. It keeps track of what function is currently being run and what functions are called from within that function.
Follows the first in the first out rule.
What is Memory Heap?
Memory Heap is where the engine allocates memory to store data.
What is Stack Overflow?
Is when the Call Stack has grown too large.
What is Garbage Collection?
Garbage Collections is when the Javascript engine frees up allocated memory from objects no longer being used.
This doesn’t mean you shouldn’t care about memory management.
What are the 3 most common ways to create a memory leak?
Global Variables
Event Listeners.
Set Interval.
Javascript is a single-threaded language. What does single-threaded mean?
Single threaded means only one set of instructions is executed at a time.
What is Javascript Runtime?
Javascript Runtime is the environment that houses the WebAPI, Callback Queue, Event Loop, and Engine.
What is the Execution Context?
The ‘environment’ a function executes in.
What is the Lexical Environment?
Where in the file your code is written in relation to the other code.
Think of like each function or code has its own world / its own lexical environment.
What kind of function is in the picture?
Function Expression.