This lesson is for subscribers
You've completed the free preview. Subscribe to unlock every lesson in every course.
Use Array.findIndex() to get the index of the first element passing a test, returning -1 if none match.
You've completed the free preview. Subscribe to unlock every lesson in every course.