0

What is “?” used for??

I can’t find why “?” is used in operators

20th Dec 2018, 2:44 AM
santiago86
santiago86 - avatar
6 Antworten
+ 3
? Used in to use if inside an expression For example x += x>50 ? -25 : 25 It means decrease x by 25 if x more than 50. But increase by 25 if not.
20th Dec 2018, 3:17 AM
Taste
Taste - avatar
+ 1
What language ?
20th Dec 2018, 3:06 AM
Taste
Taste - avatar
+ 1
Then put swift in question's tags
20th Dec 2018, 3:09 AM
Taste
Taste - avatar
20th Dec 2018, 12:34 PM
Gordon
Gordon - avatar
0
swift
20th Dec 2018, 3:07 AM
santiago86
santiago86 - avatar
0
Thanks
20th Dec 2018, 3:10 AM
santiago86
santiago86 - avatar