Arrays & Iterables

Array Intersection

easyJS SpecificJS / TS3 tests

Problem Statement

Implement `intersection(arr1, arr2)` that returns a new array of unique values that are included in both input arrays.

Examples

Example 1:
intersection([1, 2, 2, 3], [2, 3, 4]); // [2, 3]
JavaScript & TypeScript starter code included
Run this as a live interview

Practice solo

3 test cases. No second person needed.

Get new interview exercises

Practice problems and review drills, sent when we publish new ones. No spam.

Unsubscribe anytime. We never share your address.