Last active
April 20, 2022 20:26
-
-
Save PankajGaikar/09bcc212240cbb3f258ff5b60a8bf571 to your computer and use it in GitHub Desktop.
User
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
struct User { | |
let firstName: String | |
let lastName : String | |
var birthDay : Date? | |
func isValid() -> Bool { | |
return firstName == "max" | |
} | |
} | |
let testUser = User(firstName: "max", lastName: "max's last name") | |
assert(testUser.isValid() == true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment