1. is unordered
  2. and has no duplicate values

Set can be made by converting existing array to it.

Set is primarily used for performance, has very fast lookup and insertion. Because it conforms to hashable

On the other hand array is less performant because it retains it’s order and can contain duplicated items.

var ages = [23, 34, 55, 56, 3, 23]

var agesSet = Set(ages)

converted an ages array to set and then stored it in agesSet variable.

the set on ages array won’t contain duplicates ie. 23 will be printed once.

agesSet**.contains**(34) ⇒ checks whether 34 is inside the set or not.

agesSet**.insert**(104) ⇒ inserts 104 int to the set.