Question : swift contains
Answered by : max-koene
let elements = [1, 2, 3, 4, 5]
if elements.contains(5) { print("yes")
}
Source : https://stackoverflow.com/questions/24102024/how-to-check-if-an-element-is-in-an-array | Last Update : Thu, 24 Feb 22