0

I cant understand this codes meaning in swift help me please

in THIS CODE —var gender = 1 gender == 0 ? print("male") : print("female")— when I run the code it prints femalE I TRYED PUTTING DIFFIRENT NUMBER BUT STILL FEMALE HOW DOES THIS WORK? PLEASE EXPLANE IF YOU KNOW, THANKS.

11th Jun 2020, 1:44 PM
Coder
Coder - avatar
2 ответов
+ 1
ohhhh thank you so much but from this do you mean == is true and = is false?
11th Jun 2020, 7:53 PM
Coder
Coder - avatar
+ 1
thanks soo much
12th Jun 2020, 2:22 PM
Coder
Coder - avatar