var numbers = [1, 2, 3] var number = 2 if numbers.contains(number) { var msg = "found" }
使用contains,array的成員必須可以比較, 型別必須遵從Equatable protocol