Here is example bug find and fix question from student:

Student was getting error "Unit model class "Stats" does not exist.

Solution Ideas:

See debugging (this) chapter. We want to use a general plan of attack in regard to tackling bugs.

Finding Bug:

opened "unit-test.html" in web browser (where bug was surfacing)
ctrl-shift-i (dev tools)
went to console tab
told me Unexpected token ';' on line model.js:59
(this is exactly what we need -- the line number)
went to line 59.
Observed this line:
    if( i = 0; n = arr.length; i < n; i++){
A couple problems:
#1 -- Want two semicolons, not three, e.g.
    (<initializer>; <condition>; <incrementor>)
#2 -- Hint: is the "if" the right statement?


Fixing Bug and Testing: