O'Reilly logo

JavaScript: Novice to Ninja, 2nd Edition by Darren Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10: Testing and Debugging

Errors and bugs are a fact of life in programming ― they will always be there. A ninja programmer will try to do everything to minimize errors occurring, and find ways to identify and deal with them quickly.

In this chapter, we’ll cover the following topics:

  • Errors, exceptions, and warnings

  • The importance of testing and debugging

  • Strict mode

  • Debugging in the browser

  • Error objects

  • Throwing exceptions

  • Exception handling

  • Testing frameworks

  • Our project ― we'll add some log messages and tests to the Quiz Ninja application

Errors, Exceptions, and Warnings

Errors are caused when something goes wrong in a program. They are usually caused by one of the following:

  • System error ― there’s a problem with the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required