Skip to the content.

Code 301 Class 09 Reading Notes

Understanding the JavaScript Call Stack

  1. What is a call A function invocation by used by the call stack. Since the call stack is single function(s) execution, is done, one at a time, from top to bottom. It means the call stack is synchronous.
  2. How many calls can happen at once? One call can occur at once.
  3. What does LIFO mean? Last In, First Out
  4. Draw an example of a call stack and the functions that would need to be invoked to generate that call stack. call stack
  5. What causes a Stack Overflow It occurs when there is a recursive function (function that calls itself) without an exit point.

JavaScript error messages

  1. What is a ‘reference’ error? When you try to use a variable that is not yet declared.
  2. what is a ‘syntax error’? When you have something that cannot be parsed in terms of syntax.
  3. What is a ‘range error’? When manipulating an object with some kind of length and git it an invalid length.
  4. What is a ‘type error’? When the types (number, string, etc) we are tyring to use or access are incompatible, like accessing a property in an undefined type of varable.
  5. what is a ‘breakpoint’? Can be achieved by putting a debugger statement in your code in the line you want to break.
  6. What does the word ‘debugger’ do in your code? Adding the statment when running the code above you can see the ‘history’ before reaching that breakpoint.

Things I want to know more about

I like the small add to help ‘debbug’, by adding the word debugger; could help with helping find reference points that is causing the break.

<—BACK