You can do with below options.
// Option 1 - Using Set's
let arrayOne : Set = [1,2,3,4,5,6,7,8]
let arrayTwo : Set = [1,2,4,5,6,7]
var result = arrayOne.symmetricDifference(arrayTwo)
print(result) // {3,8}
// Option 2 - Using Array
var result1 = [Int]()
for value in arrayOne
{
if !arrayTwo.contains(value)
{
result1.append(value)
}
}
print(result1) // {3,8}