Answers for "set in swift"

2

settimeout in swift

DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { // Change `2.0` to the desired number of seconds.
   // Code you want to be delayed
}
Posted by: Guest on November-28-2019
0

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"]
Posted by: Guest on January-24-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language