CIS 119 Chapter 6

Objectives

  • Explain the purpose of testing and debugging
  • Explain the different types of errors
  • Debug and test JavaScript using a browser
  • View source code for HTML, CSS, and JavaScript
  • Validate HTML

Online notes for the week

Chapter 6 outline

  • Reasons for testing and debugging.
  • Type of errors:
    • Syntax error: caught by interpreter or compiler
    • Logic error: program runs, but with incorrect results (although the results may be correct most of the time)
    • Runtime error: encountered while program is running, caused by things like division by 0, trying to access non-existent objects, etc.
  • Test and debug using Chrome developer tools (Ctrl-Shift-I)
  • View source code from browser
  • Validate HTML: https://validator.w3.org/