I'm trying to add edit some code from Apple's QuestionBot. I came up with this:
func responseToQuestion(question: String) -> String {
if question.hasPrefix("hello") {
return "Hello"
} else if question.hasPrefix("where") {
return "There"
} else if question.hasPrefix("what"){
return "I don't know"
}
}
But there's an error: Missing return in a function expected to return 'String'. What should I do, thanks?