Question 1/12: This code will result in a constant set to nil
– true or false?
Hint: Click to show.
struct Password {
var text: String
init?(input: String) {
if input.count < 6 {
print("Password too short.")
return nil
}
text = input
}
}
let password = Password(input: "hell0")
Link copied to your pasteboard.