[Solved] string assignment with or operator [closed]


You could try something like this,

test = (condition)?"somevalue":"somevalue"

Basically, I am using ternary operators. If the condition is true, then the value after ‘?‘ gets assigned to test. Otherwise, test will equal to the value after ‘:‘. 🙂

4

solved string assignment with or operator [closed]