Declaring Sets
suggest changeSets are unordered collections of unique values. Unique values must be of the same type.
var colors = Set<String>()
You can declare a set with values by using the array literal syntax.
var favoriteColors: Set<String> = ["Red", "Blue", "Green", "Blue"]
// {"Blue", "Green", "Red"}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents