Compilation vs Interpretation
Question
What is the key difference between a compiler and an interpreter?
Hint
Think about WHEN the translation happens.
Explanation
A compiler translates the entire source code into machine code before the program runs (e.g., C, Java's JIT). An interpreter reads and executes the source code line-by-line at runtime (e.g., Python, JavaScript). Compiled programs start faster but take time to compile; interpreted programs start immediately but run slower.
Related Resources
Related Lessons
- How Programs Work
Learn how programs work.
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.