Set()
The Set constructor lets you
create Set objects that store unique values of any type, whether primitive values or object
references.
Syntax
new Set()
new Set(iterable)
Note:
Set()can only be constructed withnew. Attempting to call it withoutnewthrows aTypeError.
Parameters
iterableoptional: If an iterable object is passed, all of its elements will be added to the new
Set.If you don't specify this parameter, or its value is
null, the newSetis empty.
Return value
A new Set object.