JavaScript Array length Quiz
Multiple ChoiceBeginner
Question
What is the value of `[10, 20, 30].length`?
Hint
length counts how many elements are in the array.
Explanation
The length property of an array returns the number of elements it contains. The array [10, 20, 30] has three elements, so .length is 3. It does not return the last value (30) or the last index (2).
Related Resources
Related Lessons
- JavaScript Arrays
Learn about JavaScript arrays and their properties.
Related Reference
- JavaScript Array Reference
Reference for JavaScript array methods and properties.
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.