For Loop Three Parts
Multiple Choice Beginner
Question
In for (let i = 0; i < 5; i++), what are the three parts?
Hint
The semicolons separate the three sections.
Explanation
The for loop has three parts separated by semicolons: initialization (let i = 0), condition (i < 5), and update (i++). The init runs once, the condition is checked before each iteration, and the update runs after each iteration. The loop continues while the condition is true.
Related Resources
Related Lessons
- Loops (for & while)
Learn how for and while loops 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.