reading-notes

code fellows reading notes

View on GitHub

Reading-Notes

code fellows 201

Read: 10 - JS Debugging

[JavaScript & JQuery]

Chapter 10: Error Handling & Debugging (p. 449-486)

This chapter of the book goes over how to find errors in code and how to write code that runs more smoothly.

Order of execution To find errors, you need to know how scripts are processed. It h=must go in a single file order.

Execution Contexts:

Executed Context

Every statement in a script lives in one of 3 execution contexts:

  1. Global Context- Code that is in the script, but not a function. There is only one in any page.

  2. Function Content- Code run within a function. Each function has its own function context.

  3. Eval Context- Text is executed like code in an internal function called eval(). [Not covered in book]

Variable Scope