A Set object lets you store unique values of any type, whether primitive values or object references. It is not index based and you can’t access the items individually.

See the Pen thecodelog.com - ES6 Sets 1 by Deano (@deangilewicz) on CodePen.

You can add items to Set after the fact and use an iterator to keep order of items in check.

See the Pen thecodelog.com - ES6 Sets 2 by Deano (@deangilewicz) on CodePen.

Set uniqueness does not allow coercion, so 1 and “1” are considered distinct values.

See the Pen thecodelog.com - ES6 Sets 3 by Deano (@deangilewicz) on CodePen.