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- 1Read the error messageJavaScriptThe message tells you where to look12 min
- 2Guard clausesJavaScriptReturn early instead of nesting conditions12 min
- 3Where to put tryJavaScriptKeep it narrow and lose no errors13 min
- 4Errors that explain what happenedJavaScriptThe word "failed" alone is not enough12 min
- 5Off-by-one errorsJavaScriptTest the edges before the middle11 min
- 6Tricky comparisonsJavaScriptThree comparisons that silently give the wrong answer12 min
- 7Promise errorsJavaScriptWhat you don't await, you can't catch13 min
- 8Fail fastJavaScriptThe error shows up at its cause, not after it12 min
More Web tracks
All tracks- </>Beginner
Web Basics
Start with your very first HTML tag and finish with a complete interactive app.
8 lessons1.5 hours - { }Intermediate
CSS in Depth
Go deeper into the box model, custom properties, positioning, container queries and more, so you understand what's really going on behind the styles you see.
8 lessons1.5 hours - { }Beginner
Text and Typography
Learn to scale headings, choose the right units, and set line length and text direction, because text is what people read most in any interface.
8 lessons1.5 hours