How to compare one value against multiple values in Swift?

let valuesArray = ["ab","bc","cd"]

valuesArray.contains(str) // -> Bool

Leave a Comment