lecture 11 of 200 completed

Check which items came back

A list can repeat an entry and still have the expected length. Check the values the reader needs.

What you'll learn

  • Read one field from each item with map.
  • Compare repeated and missing entries with an independent list.
  • Explain which mistakes a TypeScript type can catch.

programme.length === 2 passes. The printed programme lists “Old maps” twice. That talk was cancelled. Neither scheduled talk appears.

You are reviewing an invented arts programme. Visitors should see Book binding first and Night skies second. A count tells you how many entries appear. It cannot tell you which talks a visitor can attend.

Write the expected titles from the schedule. Then read the titles the programme actually shows.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →