Need to loop through an array and say whether there are any pairs of numbers that sum to 8
e.g. [1,2,4,4] = yes
Can get it working with lots of nested if stateme
You can use nested for loops with indexes:
for (firstIndex, firstElement) in numbersSet.enumerated() { for (secondIndex, secondElement) in numbersSet.enumerated() { if firstIndex != secondIndex && firstElement + secondElement == 8 { return true } } }