Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

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"]
Source by developer.apple.com #
 
PREVIOUS NEXT
Tagged: #set #swift
ADD COMMENT
Topic
Name
3+7 =