The following code snippets cause the compiler to generate an error. Fix it.
var isMember :Bool? if isMember { print("User is a member") } else { print("User is a not member") }
You should ensure that isMember is not nil before using it.
Then unwrap it using the ! character:
var isMember:Bool? if isMember != nil { if isMember! { print("User is a member") } else {/*www .j a v a 2s. c o m*/ print("User is a not member") } }