Checking Arrays

Learn various approaches for checking an array result in a test in this lesson.

Checking the length of the array

The project for this lesson contains a function called searchPeople, which returns matched people objects in an array for some criteria. A test has been partially implemented that checks whether the correct array is returned when a first name is passed as the criteria.

A copy of the starter project is in the code widget below:

Get hands-on with 1200+ tech skills courses.