reading-notes

Notes

What is a ‘call’?

it is the code used to cause a function to run

How many ‘calls’ can happen at once?

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

function firstFunction(){ throw new Error(‘Stack Trace Error’); }

function secondFunction(){ firstFunction(); }

function thirdFunction(){ secondFunction(); }

thirdFunction();

What causes a Stack Overflow?

when a function without an end point calls itself it will cause a loop and jam up the other functions attemps to run

What is a ‘refrence error’?

when you attempt to use a variable that isn’t declared

What is a ‘syntax error’?

when you attempt to pass variables that do not work together

What is a ‘range error’?

when you attempt to adjust something by an incorrect length value

What is a ‘tyep error’?

when variables are undefinied

What is a breakpoint?

it will only run a function up to the point you want based on the breakpoint instead of the entire function

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

it is something you do in the console. things like console.log() help find where functions are breaking and what parts are working

BACK TO HOME