Wun Code
JavaScript

Finding and Fixing Bugs

Learn how to read an error message, check inputs before you use them, and catch the errors worth handling.

Start the trackFree, no sign-up needed

What you'll learn

  • Read the error messageThe message tells you where to look
  • Guard clausesReturn early instead of nesting conditions
  • Where to put tryKeep it narrow and lose no errors
  • Errors that explain what happenedThe word "failed" alone is not enough
  • Off-by-one errorsTest the edges before the middle
  • Tricky comparisonsThree comparisons that silently give the wrong answer
  • Promise errorsWhat you don't await, you can't catch
  • Fail fastThe error shows up at its cause, not after it

Track contents

8 lessons, 1.5 hours in total
  1. 1Read the error messageJavaScriptThe message tells you where to look
  2. 2Guard clausesJavaScriptReturn early instead of nesting conditions
  3. 3Where to put tryJavaScriptKeep it narrow and lose no errors
  4. 4Errors that explain what happenedJavaScriptThe word "failed" alone is not enough
  5. 5Off-by-one errorsJavaScriptTest the edges before the middle
  6. 6Tricky comparisonsJavaScriptThree comparisons that silently give the wrong answer
  7. 7Promise errorsJavaScriptWhat you don't await, you can't catch
  8. 8Fail fastJavaScriptThe error shows up at its cause, not after it