Last active
March 1, 2023 07:06
-
-
Save haikieu/58ab90f144481dd4eeaa490060636633 to your computer and use it in GitHub Desktop.
function without golden path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func authenticateUser(_ username: String?, with password: String?) -> Bool { | |
if let username = username, let password = password { | |
//Validate usernane and password | |
... | |
return true //Assuming, the username and password are valid | |
} else { | |
//Base input, do something | |
return false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment