So I'm working on an application that has to check if one of the given values are in an array
if hand1.contains(0||13||26||39) {
PresentA = true
} else {
PresentA = false
}
Xcode keeps saying : "Cannot convert value of type 'Int' to expected argument type 'Bool'". I have no idea on what is wrong with this piece of code. I want this all in one if-statement because that would make my program a lot smoother.
It doesn't give me an error when I replace the double pipes with single ones. But I know that that those are bitwise or something and won't help with what I want.
if hand1.contains(0|13|26|39) {
PresentA = true
} else {
PresentA = false
}
I am currently using Xcode 11.3.1