Declare Numeric totCust // total Customers
var totCust; // total Customers
I feel sorry for you, that your stupid stupid instructor would choose this horrible book out of all those available.
So you are better off just writing HTML code and then debugging it in a web browser.
All modern browsers except FireFox come with a debugger built in (and FireBug can be plugged into FireFox and used as its debugger). All of them can be invoked by simply hitting the F12 key.
MSIE 9 is not too bad for debugging, but I think that CHROME is a better choice. There are just a handful of differences, but that handful are enough to make using Chrome much easier, especially when just beginning.
And while you *CAN* create your JS code in a ".js" file and then attach it to a web page as Felgall shows (and as you will want to do when you get more advanced), especially when you are just starting this is more of a pain than it is worth. Instead, just embed your JS code right into your HTML code. Just use
... put your js code here ...
Later, you will learn when to put the JS code into the <head>...</head> section of the HTML and when to leave it where I show it there. But given what we know about that atrocious book, the way I show it there is likely the best starting spot.