The ternary operator is another way of representing a series of if, else if, else statements depending on the level you need.
Instead of going,
if()
...
else
...
you can go (general syntax view)
value = <condition> ? <true-case> : <false-case>
A basic example in C:
int a = 10;
int b = 20;
int max = a > b ? a : b;
Above is basically saying, if a greater than b ? return value a else return b. In this case it would return b