Welcome to the sixteenth Easy JavaScript Tutorial, Beginner JavaScript Tutorial, part of Easy Programming! In his tutorial, we're going to talk about debugging your code.
Debugging your code has to do with finding a bug which causes your script to run in an unexpected way (or not run at all), and fix it. The point of debugging should also be to find out WHY a bug exists in the first place because if you can understand why something has happened, you can prevent it in the future.
We're going to spend a lot of time in our browser developer tools in this tutorial. We're also going to use a base html and a javascript file rather than JSFiddle.
Like I said in the past, JavaScript doesn't need a server to run, you can run it off your computer without having to run any kind of web server.
This tutorial doesn't use JSFiddle, please view the debugging.html page linked to from the Resources section below.
Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!
Please view/download the debugging.html file here to follow along: http://www.easyprogramming.net/downloads/javascript/debugging/debugging.html
Also be sure to watch the tutorial on how to use your browser developer tools to learn more!