0

Can retrun be placed anywhere at end of guard function?(Short code)

Can return be placed at both this places without any consequences? Example: func guardStatements() { guard let f = first else{ print("nil value") retrun } //or like this func guardStatements() { guard let f = first else{ return print("nil value") }

28th Apr 2021, 11:36 AM
Dzondzula
Dzondzula - avatar
0 Réponse