whats is set swift? code example
Example: set in swift
let setExample: Set = ["Apple", "Orange", "Banana", "Apple"]
if setExample.contains("Apple") {
print("Its healthy")
}
print(setExample)
// OUTPUT:
//Its healthy
//["Orange", "Apple", "Banana"]