Why isn\'t this working? I can use array.contains() on a String but it doesn\'t work for an Object.
var array = [\"A\", \"B\", \"C\"] array.contains(\"A\") //
Your Dog needs to implement Equatable.
Dog
Equatable
class Dog: Equatable { var age = 1 } func == (lhs: Dog, rhs: Dog) -> Bool { return lhs.age == rhs.age }