- Syntax Errors prevent the code from running at all, while Logic Errors allow the code to run but produce incorrect results.
- Syntax Errors produce clear error messages pointing to issues, Logic Errors do not give such direct error indications.
- Missing semicolons at the end of lines (add ;)
- Misspelled variable and function names (spell them correctly)
- Missing closing brackets or parentheses - caused “missing (add the brackets)
- logic errors resulting in incorrect sums (dump out lots of console logs; sometimes asking GPT)
- I’m not sure how to answer this
- it’s the worst part of coding, until you fix it, then it’s the best part!
a tool that lets you pause code execution at certain points and inspect variable values. It helps you step through your code line-by-line to find issues.
You can set breakpoints to pause execution and see the variable state and call stack, making it useful for debugging complex code.
The call stack shows the sequence of function calls that led to the current code execution point. It displays the nested list of functions called, helping identify how execution reached that point, making it valuable for debugging purposes.