Unfortunately, bugs are a part of life when writing software, no
matter what language you’re working with. Debugging,
as the name suggests, is the process of tracking down bugs and fixing them.
The process of debugging can be as simple as adding
console.log() calls to your code to verify that certain
variables hold expected values. But for more involved bugs, you’ll want to
use a debugger. Debuggers are extremely successful at tracking down bugs, as
they allow you to step through an application line by line, inspecting (and
modifying) variable values.