back to Overview

.intersection()

Takes two input lists to create a new list containing only those values that exist in both input lists.
Util module only.

Syntax Variants

list.intersection(otherList)
_.intersection(list, otherList)

Parameters

list
The list of values. Can be an array, a Minified list or any other array-like structure with length property.
otherList
The other list of values. Can be an array, a Minified list or any other array-like structure with length property.
(return value)
A Minified list containing only the duplicate values.

Description

Takes two input lists to create a new list containing only those values that exist in both input lists.

Uses object properties to keep track which values exist. This means that it only works with simple values that can be converted to strings.

Comments

comments powered by Disqus

back to Overview

Functions