reading-notes

Class 201.10 Friday 21st July 2023

Notes

Readings

Q&A’s

Javascript errors

  1. Name some key differences between a Syntax Error and a Logic Error.
    • 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.
  2. List a few types of errors that you have encountered in past lab assignments and explain how you were able to correct them.
    • 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)
  3. How will this topic continue to influence your long term goals?
    • 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!

Javascript debugging

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

    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.

  2. Define what a breakpoint is.

    You can set breakpoints to pause execution and see the variable state and call stack, making it useful for debugging complex code.

  3. What is the call stack?

    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.

References