Why this topic matters as it relates to the material I am studying: This topic matters because it is important to understand how the call stack works in order to understand how to debug code.
-
What is a call? A call is a function invocation.
-
How many 'calls' can happen at once? One.
-
What does LIFO mean? Last In First Out.
-
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? A stack overflow occurs when there is a recursive function (a function that calls itself) without an exit point.
-
What is a 'reference error'? A reference error is when you try to use a variable that is not yet declared.
-
What is a 'syntax error'? A syntax error is 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'? A range error is when you try to manipulate an object with some kind of length and give it an invalid length.
-
What is a 'type error'? A type error is when the types (number, string, etc.) you are trying to use or access are incompatible.
-
What is a breakpoint? A breakpoint is a point in your code where you can pause the execution of your code.
-
What does the word 'debugger' do in your code? The word debugger in your code will pause the execution of your code.
- How to use the debugger in VS Code.