I'm making a command line Swift app and I have a user prompt where users can answer "yes" and proceed or anything else and exit. But I was thinking what if someone answers "y" or "YES" or "Yes" or "yEs". I've tried using || but apparently that is only for ints.
This is my code:
var askNewFile = getInput()
if askNewFile == ("yes") {
//code to start blank editor
}
else {
print("Bye!")
exit(1)
}
I would appreciate any help, or even nudges in the right direction.