let orignalArray = [1,2,3,4] let newArray = orignalArray.filter { $0 != 2 } // use remove element insted of 2 print(newArray) // [1,3,4]