Johnston - Reading Notes - Home
Code 201, Foundations of Software Development
Class 10 - Reading Notes
Readings: Debugging
What Went Wrong? Troubleshooting JavaScript
Name some key differences between a Syntax Error
and a Logic Error
.
- A syntax error is an error in how the code is written. JavaScript wont run the code, due to the error. Ex, could be: a typo or a missing bracket.
- Logic error will still run, but the result of the code result isn't what was intended. Ex, could be: Using subtraction instead of addition.
List a few types of errors that you have encountered in past lab assignments and explain how you were able to correct them.
- ReferenceError, the variable was out of place.
- SyntaxErrors, missing brackets/random text in the middle of the code.
- TypeErrors, input wrong variable as an argument.
How will this topic continue to influence your long term goals?
- Recognition of error type helps expedite the debug process.
How would you describe the JavaScript Debugger tool and how it works to someone just starting out in software development?
- Debugging tool is similar to an xray, in that you can look at specific points in the code.
Define what a breakpoint is.
- Breakpoints allow the code to run to a point and then pause. This can be used to find errors in your code.
What is the call stack?
- Call stack is the tasks that JS performs. It generates the stack the first time passing through the code, then will add to the stack as it runs a second time.
Things I want to know more about:
https://chrisjohnston1986.github.io/reading-notes/201class10reading