+ 1

So this operator could be used only for if loop???

10th Mar 2017, 6:28 AM
Sudharsan Ramesh
Sudharsan Ramesh - avatar
5 odpowiedzi
+ 6
if is not a loop. but what operator do you mean?
10th Mar 2017, 6:47 AM
Mario L.
Mario L. - avatar
+ 4
which operator do you mean? there are several...
10th Mar 2017, 6:51 AM
Mario L.
Mario L. - avatar
+ 4
yes, that is the short form of: if (exp1) { exp2; } else { exp3; } I personally prefer the long form. It's easier to read 😃
10th Mar 2017, 9:07 AM
Nikolay Nachev
Nikolay Nachev - avatar
0
sorry , so we can use those operator only for if statement?
10th Mar 2017, 6:50 AM
Sudharsan Ramesh
Sudharsan Ramesh - avatar
0
exp1?exp2:exp3
10th Mar 2017, 6:53 AM
Sudharsan Ramesh
Sudharsan Ramesh - avatar