In memory storage

Reading-notes.md


In memory storage

Understanding the JavaScript Call Stack

1.What is a ‘call’? Its function invocation.

2.How many ‘calls’ can happen 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.

5.What causes a Stack Overflow?

When a recursive function (which calls itself function) without an exit point exists, a stack overflow occurs.

JavaScript error messages && debugging

JavaScript error messages

What is a ‘refrence error’?

This is as simple as when you try to use a variable that is not yet declared you get this type os errors.This is also a common thing when using const and let, they are hoisted like var and function but there is a time between the hoisting and being declared so when you try to access them a reference error occurs, the fact that this happens to let and const is called Temporal Dead Zone (TDZ).

What is a ‘syntax error’?

it’s in the name of the errors, but like it says itself, this occurs 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’?

Try to manipulate an object with some kind of length and give it an invalid length and this kind of errors will show up.

What is a ‘tyep error’?

this types of errors show up when the types (number, string and so on) you are trying to use or access are incompatible, like accessing a property in an undefined type of variable.This is probably the most frequent error in JS, trying to access a property/method thinking that bar is of the type object when in reality, since it hasn’t been declared yet.

What is a breakpoint?

is a point in the program where the code will stop executing.

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

is the process of detecting and removing of existing and potential errors (also called as ‘bugs’) in a software code that can cause it to behave unexpectedly or crash. Debugging tools (called debuggers) are used to identify coding errors at various development stages.