Set
The Set object lets you store unique values of any type, whether primitive values or object references.
The Set[@@species] accessor property returns the Set constructor.
The Set.prototype property represents the prototype for the Set constructor.
This chapter introduces collections of data which are ordered by a key; Map and Set objects contain elements which are iterable in the order of insertion.
The add() method appends a new element with a specified value to the end of a Set object.
The clear() method removes all elements from a Set object.
The delete() method removes the specified element from a Set object.
The forEach() method executes a provided function once per each value in the Set object, in insertion order.
The has() method returns a boolean indicating whether an element with the specified value exists in a Set object or not.
The size accessor property returns the number of elements in a Set object.
The set() method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
The initial value of the @@iterator property is the same function object as the initial value of the values property.
The entries() method returns a new Iterator object that contains an array of [value, value] for each element in the Set object, in insertion order. For Set objects there is no key like in Map objects. However, to keep the API similar to the Map object, each entry has the same value for its key and value here, so that an array [value, value] is returned.
The values() method returns a new Iterator object that contains the values for each element in the Set object in insertion order.