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.

  1. Use the .length property to find out how many items are in the array.
  2. Return the total count as a number.

01EXAMPLE 1

Inputitems = [5, 10, 15]
Output3

Constraints

  • Return the length as a number.
FundamentalsArrays
JavaScript
Loading...
3 Hidden

Input Arguments

items[1,2,3]

Expected Output

3

Click RUN to test your solution