Skip to content

pairs

Overview

Creates an array of arrays, which consists of pairs of objects from the input array without duplication.

For example, phet.phetCore.pairs( [ 'a', 'b', 'c' ] ) will return: [ [ 'a', 'b' ], [ 'a', 'c' ], [ 'b', 'c' ] ]

@author Jonathan Olson <jonathan.olson@colorado.edu>

Source Code

See the source for pairs.ts in the phet-core repository.