Except where otherwise noted, the contents of this document are Copyright 2012 Marty Stepp, Jessica Miller, and Victoria Kirst. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the author's expressed written permission.
My program does nothing.(most errors produce no output)
It just prints undefined. (many typos lead to undefined variables)I get an error that says, foo has no properties.
"use strict"; your code...
"use strict"; at the very top of your JS file turns on strict syntax checking:
alert at the top of it and make sure it appears.
Check bottom-right corner of Firefox for Firebug syntax errors.
Since JavaScript has no compiler, many errors will cause your JavaScript program to just "do nothing." Some questions you should ask when this happens:
alert at the VERY TOP of your script:

alert at the start of the appropriate function:
"hello" or "here"Object foo has no propertiesReferenceError: foo is not definedTypeError: foo.bar is not a functionid
function foo() {
... // missing closing curly brace!
function bar() {
...
}
continue (F8): start program running again
step over (F10): run current line of code completely, then stop again
step into (F11): run current line of code; if it contains a call to another function, go into it
step out (Shift-F11): run the current function to completion and return, then stop
style property to see all styles