*Readings: In memory storage
Understanding the JavaScript Call Stack
- What is a ‘call’? When a function is invoked.
- How many ‘calls’ can happen at once? One at a time.
- What does LIFO mean? It means that the last function that gets pushed into the stack is the first to be pop out, when the function returns.
- Draw an example of a call stack and the functions that would need to be invoked to generate that call stack.

- What causes a Stack Overflow? there is a recursive function (a function that calls itself) without an exit point. The browser (hosting environment) has a maximum stack call that it can accomodate before throwing a stack error.
JavaScript error messages
- What is a ‘reference error’? When you try to use a variable that is not yet declared you get this type os errors.
- What is a ‘syntax error’? When you have something that cannot be parsed in terms of syntax, like when you try to parse an invalid object using JSON.parse.
- What is a ‘range error’? When you try to manipulate an object with some kind of length and give it an invalid length.
- What is a ‘type error’? when the types (number, string and so on) you are trying to use or access are incompatible, like accessing a property in an undefined type of variable.
- What is a breakpoint? An example would be console.log() to check and debug your code.
- What does the word ‘debugger’ do in your code? Put a breakpoint in your statement so you can check/debug your code.
References/CREDIT
https://www.freecodecamp.org/news/understanding-the-javascript-call-stack-861e41ae61d4
https://codeburst.io/javascript-error-messages-debugging-d23f84f0ae7c