+ 4

Swift question mark

I'm still confused about the ? in swift . I even googled what it means but I still don't understand it. Can someone please help me?

11th Apr 2020, 8:54 PM
unknowncoder24
unknowncoder24 - avatar
5 odpowiedzi
+ 3
Thanks ChillPill
11th Apr 2020, 9:12 PM
unknowncoder24
unknowncoder24 - avatar
+ 2
Thank you bendjebbar
19th Apr 2020, 7:17 PM
unknowncoder24
unknowncoder24 - avatar
+ 1
//You can also use it (?) like this exemple : let x = 10 // while x < 20 , i take value of i else i take value of 2*x var i = x<20 ? x : 2*x
19th Apr 2020, 7:15 PM
bendjebbar
bendjebbar - avatar
0
This operator is available in many languages, not just Swift.
4th Jan 2021, 4:29 AM
Sonic
Sonic - avatar