+ 1

Values Cannot be Letters??

I am confused, I have tried several times but I cannot seem to make my variables have values of letters or strings— I put in this and get error as my answer. var fruits = apple fruits == apple ? print("male") : print("female") let fruits = apple fruits == apple ? print("male") : print("female") Is there any way I can have the variables to have values in letters? Am I supposed to do this?: var fruits:String var fruits = apple fruits == apple ? print("male") : print("female") let fruits = apple fruits == apple ? print("male") : print("female")

4th Jan 2020, 11:53 PM
otto man
otto man - avatar
1 Answer