Swift- Using String with ternary Operator | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Swift- Using String with ternary Operator

Why cant i use a string in an ternary Operator like this: username == "Admin"? print("Hello, Admin") : print("Hello, Stranger!") or better.. how can i fix it? -z77

15th Jul 2019, 5:32 AM
z77
1 Réponse
0
You may just need a space in between “Admin” and ?
8th Sep 2019, 10:37 PM
Benjamin