what do the "?" and the ":" operator do? i know they are conditional but i am not sure on their uses or definition.
any help is appreciated.
what do the "?" and the ":" operator do? i know they are conditional but i am not sure on their uses or definition.
any help is appreciated.
It's just like an if/else statement except it can be used anywhere an expression can, this
Is functionally the same as thisCode:x = (x != 0) ? a : b;
Code:if (x != 0) { x = a; } else { x = b; }
*Cela*