Class: Set

Set

Set

new Set() → {Set}

Creates an unordered Set. Sets have very fast add and remove, and will only hold distinct instances.
Author:
  • thegoldenmule
Source:
Returns:
Type
Set

Methods

add(element) → {Object}

Adds an element to the set. If this element is already a member of this set, it discard its previous reference so that there is only a single reference to the object.
Parameters:
Name Type Description
element Object The element to add to the Set.
Source:
Returns:
Type
Object

remove(element) → {Object}

Removes an element from the set.
Parameters:
Name Type Description
element Object The element to remove.
Source:
Returns:
Type
Object