Last active
January 16, 2023 22:11
-
-
Save shakyra/6b6fec91c58be51d3d88edfc68d4e8a7 to your computer and use it in GitHub Desktop.
Personalized greeting Create a function that gives a personalized greeting. This function takes two parameters: name and owner. Use conditionals to return the proper message: ======= case | return --- | --- name equals owner | 'Hello boss' otherwise | 'Hello guest'
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 great(_ name: String, _ owner: String) -> String { | |
// complete this function | |
if name == owner { | |
return("Hello boss") | |
} | |
else { | |
return("Hello guest") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment