Ios swift – (Swift) Confused between a return value of a for-in loop within a function, and a return value that comes after the loop (within the function))
I am confused with the following code. func allTestsPassed(tests: [Bool]) -> Bool { for test in tests { if test == false { return false } } return true } If the code within the if-else statement (within the for-in…