Summer School
Debugging camp
Three lessons, then a test against Buggsy.
What you’ll learn
- Three kinds of bugs: syntax errors (grammar), runtime errors (crashes) and logic errors (wrong answers, no crash).
SyntaxError: broken grammar.ReferenceError: a name that doesn’t exist.TypeError: using a value the wrong way.RangeError: a number out of range.- Read errors in order: the type, the message, then the line number.
console.logis your flashlight. Label your logs:console.log("total:", total).- The debugger pauses time: set a breakpoint and step through line by line.
try { … } catch (error) { … } finally { … }handles errors without crashing.throw new Error("message")creates your own errors.
The lessons
- The three kinds of bugs Syntax errors, crashes and sneaky logic errors, plus the error family.
- Reading errors and logging The error-reading routine, console.log as a flashlight, and the debugger.
- try, catch and throw Handle errors gracefully, make your own, and the top beginner bugs.
Class starts whenever you’re ready
Every lesson is free, there’s nothing to sign up for, and your progress saves as you go.