I have two arrays like this:
var arrayA = [\"Mike\", \"James\", \"Stacey\", \"Steve\"] var arrayB = [\"Steve\", \"Gemma\", \"James\", \"Lucy\"]
I agree with Antonio's answer, however for small array subtractions you can also use a filter closure like this:
let res = arrayA.filter { !contains(arrayB, $0) }