reading-notes

View project on GitHub

Class10

Return to home page.

JavaScript Call Stack

  • What is a ‘call’?

The call stack maintains a record of the position of each stack frame. It knows the next function to be executed (and will remove it after execution).

  • How many ‘calls’ can happen at once?

Once.

  • What does LIFO mean?

Last In, First Out (LIFO).

  • 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.

error messages

  • What is a ‘refrence error’?

when you try to use a variable that is not yet declared you get this type os errors.

  • What is a ‘syntax error’?

this occurs when you have something that cannot be parsed in terms of syntax.

  • 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’?

this types of errors show up when the types (number, string and so on) you are trying to use or access are incompatible,

  • What is a breakpoint?

The breakpoint can be achieved by putting a debugger statement in your code in the line you want to break.

  • What does the word ‘debugger’ do in your code?

A debugger is a program that allows you to step through another program one line at a time. This is very useful when trying to identify incorrect code and analyze how a program “flows”. Key concepts include: Breakpoints, Stepping, and Viewing data.