WLJS LogoWLJS Notebook

Intersection

Intersection[list1, list2, ...] gives a sorted list of the elements common to all the lists.

Examples

Find common elements:

Intersection[{a, b, c, d}, {b, c, d, e}]
(* {b, c, d} *)

Multiple lists:

Intersection[{1, 2, 3, 4}, {2, 3, 4, 5}, {3, 4, 5, 6}]
(* {3, 4} *)

Please visit the official Wolfram Language Reference for more details.

On this page