What am i doing wrong | SoloLearn: Learn to code for FREE!


What am i doing wrong


5/16/2020 8:09:31 PM

Joshua Flynn

1 Answer

New Answer


tolowercased is actually a function and you can't compare those two functions like that. You have to actually call them with parenthesis. fixed code: let s1 = "We are alike" let s2 = "We are Alike" if s1 == s2 { print("These two strings are equal") } else if s1.lowercased() == s2.lowercased(){ print("these two strings are similar") } else{ print("these are two different strings")}