reading-notes

In memory storage

Understanding the JavaScript Call Stack

What is a ‘call’?

a call stack is a data structure that uses the Last In, First Out (LIFO) principle to temporarily store and manage function invocation (call).

How many ‘calls’ can happen at once?

The number of calls that can happen simultaneously in a program depends on the programming language, the runtime environment, and the available system resources

What does LIFO mean?

Last In, First Out.

What causes a Stack Overflow?

Stack Overflow occurs when the call stack, a data structure used by programs to manage function calls, exceeds its maximum size.

JavaScript error messages

What is a ‘reference error’?

A type of error that occurs in JavaScript when you try to access a variable or function that has not been declared or is out of scope.

What is a ‘syntax error’?

A “syntax error” means that the code is not written in a valid and grammatically correct way according to the language’s syntax rules.

What is a ‘range error’?

A “RangeError” occurs when a numeric value is outside the valid range or when an invalid length or index is used. It typically indicates that a value exceeds the allowable bounds or falls outside the accepted range of values.

What is a ‘type error’?

A “TypeError” occurs when an operation or function is performed on an inappropriate or incompatible data type. It typically indicates that the program attempted to use a value or variable in a way that is not supported or allowed by its data type.

What is a breakpoint?

A “breakpoint” is a debugging feature and a point in the source code where the execution of a program can be paused. When a breakpoint is set, it allows developers to inspect the state of the program at that specific location, examine variables, and step through the code line by line for debugging purposes

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

A “debugger” is a tool or software feature used by developers to identify and fix bugs or issues in their code.

Bookmark and Review