Reputation: 4986
I've looked around but was suprised that I couldn't really find anything that explained this. If I have:
func checkEmail ()
{
var test = true
return test
}
...elsewhere in the code....
var emailStatus = checkEmail ()
How can I make this function return the boolean value of true?
Upvotes: 29
Views: 43522
Reputation: 1066
func checkEmail() -> Bool {
var test = true
return test
}
Elsewhere in the code....
var emailStatus = checkEmail()
Upvotes: 64