Types of Errors Quiz
Question
Which type of error is caught when the code is first run (before execution)?
Hint
Think about which error prevents the code from even starting to run.
Explanation
Syntax errors are caught before execution because the code cannot be parsed — the grammar is wrong. Logic errors and runtime errors occur during execution: the code runs but produces wrong results (logic) or crashes (runtime). Syntax errors stop the program before it starts.
Related Resources
Related Lessons
- Errors
Learn about common programming errors.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.