Step 1 of 5 · Reading · ~1 min
Learn
Error Handling
For complex apps, distinguish error types with subclasses of Error:
js
Then instanceof lets callers handle different types differently:
js
Always set this.name in the constructor — it's used in stack traces and err.toString().
Up nextIterators and GeneratorsGenerators and Regex
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…