settimeout в Swift
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { // Change `2.0` to the desired number of seconds.
// Code you want to be delayed
}
Mobile Star
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { // Change `2.0` to the desired number of seconds.
// Code you want to be delayed
}
let setExample: Set = ["Apple", "Orange", "Banana", "Apple"]
if setExample.contains("Apple") {
print("Its healthy")
}
print(setExample)
// OUTPUT:
//Its healthy
//["Orange", "Apple", "Banana"]
// create a set of integer type
var studentID : Set = [112, 114, 116, 118, 115]
print("Student ID: \(studentID)")