+ 1
Ternary in if condition
Is it possible to use ternary operator inside if conditions??
5 Answers
+ 10
Yes.
+ 8
Is there a specific code snippet leading you to believe that you cannot?
+ 4
No I just came with the situtation where i needed ternary inside if.
0
Yes
0
No, itâs like
c-condition
if((c1 && c2) ? true : c3)