The Measuring Tape
Easy+15 XP
Mission Briefing
The supply wagons have arrived, but the manifests are missing! You must quickly build a measuring tape to count exactly how many crates are in each row.
The Concept: Array Properties
The .length property of an array tells you exactly how many items are currently inside it. It doesn't start at zero like indexes do; it counts the actual number of items!
Example: [1, 2, 3].length // Evaluates to 3
The Objective
Your function receives an array called items.
- Use the
.lengthproperty to find out how many items are in the array. - Return the total count as a number.
01EXAMPLE 1
Input
items = [5, 10, 15]Output
3Constraints
- Return the length as a number.
FundamentalsArrays
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
items[1,2,3]
Expected Output
3
Click RUN to test your solution