Code Fellows 201
Day 10 Notes
Home
Reading
What Went Wrong? Troubleshooting JavaScript.
Name some key differences between a Syntax Error and a Logic Error.
- Syntax errors: These are spelling errors in your code that actually cause the program not to run at all, or stop working part way through — you will usually be provided with some error messages too. These are usually okay to fix, as long as you are familiar with the right tools and know what the error messages mean!
- Logic errors: These are errors where the syntax is actually correct but the code is not what you intended it to be, meaning that program runs successfully but gives incorrect results. These are often harder to fix than syntax errors, as there usually isn’t an error message to direct you to the source of the error.
List a few types of errors that you have encountered in past lab assignments and explain how you were able to correct them.
- infinite loop: check and fix order of calls, variables, etc.
- syntax: missing capitals, letters, etc.
How will this topic continue to influence your long term goals?
- just ggod knowledge for targeting and even preventing errors in coding
The JavaScript Debugger.
- included browser tool that allows developers (and users) to view and identify code as it runs in steps
Define what a breakpoint is.
- simply a point in code that you’ve told the debugger to pause until you click continue (step)
What is the call stack?
- The Call stack section shows you what code was executed to get to the current line. You can see that the code is in the function that handles a mouse click, and that the code is currently paused on the breakpoint.
Bookmark and Review
Debugging HTML
Debugging CSS