Array Indexing Quiz
Question
In most programming languages, what is the index of the first element in an array?
Hint
Most mainstream languages use zero-based indexing.
Explanation
Most programming languages (JavaScript, Python, Java, C, C++) use zero-based indexing — the first element is at index 0. This comes from how arrays are implemented in memory: the index is an offset from the start, and the first element has zero offset. (Some languages like Lua or MATLAB use 1-based indexing, but they are exceptions.)
Related Resources
Related Lessons
- Arrays
Learn how arrays store ordered lists of values.
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.