In Memory Storage
code 102 notes
In Memory Storage
Understanding the JS Call Stack
- What is a ‘call’?
- primarily used for calling functions
- call stack is synchronous
- How many ‘calls’ can happen at once?
- functions are called one at a time from the top to the bottom
- 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?
- when a recursive function (a function which calls itself) doesn’t have an exit point
JS Error Messages
- What is a ‘refrence error’?
- a variable that is not yet declared
- What is a ‘syntax error’?
- code cannot be parsed because it was typed out wrong
- What is a ‘range error’?
- when an object with a length is given an invalid length
- What is a ‘tyep error’?
- This great pun is in fact not axample of a ‘type’ error but a syntax error!
- type errors show up when the types of data being accessed are incompatible
- What is a breakpoint?
- an intentional stopping point in a program which helps assist in narrowing down the lo0cation of bugs/errors
- What does the word ‘debugger’ do in your code?
- it is a built-in breakpoint