+ 1
So this operator could be used only for if loop???
5 odpowiedzi
+ 6
if is not a loop. but what operator do you mean?
+ 4
which operator do you mean? there are several...
+ 4
yes, that is the short form of:
if (exp1) {
exp2;
} else {
exp3;
}
I personally prefer the long form. It's easier to read 😃
0
sorry , so we can use those operator only for if statement?
0
exp1?exp2:exp3