In Swift, how can I check if an element exists in an array? Xcode does not have any suggestions for contain, include, or has, and a qu
contain
include
has
As of Swift 2.1 NSArrays have containsObjectthat can be used like so:
containsObject
if myArray.containsObject(objectImCheckingFor){ //myArray has the objectImCheckingFor }