# Class 10

## Readings: Debugging

### Answers

#### What Went Wrong? Troubleshooting JavaScript

1. Name some key differences between a Syntax Error and a Logic Error.

   - Syntax is to do with spelling
   - Syntax errors can be easier to fix, normally an error message will point you in the right direction
   - Logic errors are issues with your code
   - Can be more difficult to establish what the error is, and then how to fix it
  
2. List a few types of errors that you have encountered in past lab assignments and explain how you were able to correct them.

   - Normally I am able to find the error by looking at the error in the console log
   - One was me not calling a function, fortunately I was able to identify this as the error message told me which line it was struggling with. When I realised it was to do with a function, I then went through each step of the function until I found out what was missing/wrong.
  
3. How will this topic continue to influence your long term goals?

   - I'm hopeful that getting better at debugging issues will make me a stronger web developer, meaning I am more able to attain my goals of working in the industry.
  
#### The JavaScript Debugger

1. How would you describe the JavaScript Debugger tool and how it works to someone just starting out in software development?

   - It is a tool (a window in your browser) which allows users to locally test their JavaScript code in the browser. It just makes debugging so much easier for someone new to software development, as it allows you to trace the code step by step to see what exactly is going on.
  
2. Define what a breakpoint is.

   - Breakpoints are used to set points in your code where you want it to stop running, helping to identify problems.
  
3. What is the call stack?

   - The Call stack is used to keep track of multiple function calls, and it shows you what code was executed to get to the current line. Is it used for memorizing which function is running right now.
