You are viewing a single comment's thread. Return to all comments →
That's the ternary operator. It works like this:
condition ? expression 1 : expression 2
If the condition evaluates to true, the ternary operator gives you expression 1. If it is false, it gives you expression 2.
What he's doing there is chaining them together, so if the condition is false, it gets evaluated by the next ternary expression.
Seems like cookies are disabled on this browser, please enable them to open this website
Functions
You are viewing a single comment's thread. Return to all comments →
That's the ternary operator. It works like this:
If the condition evaluates to true, the ternary operator gives you expression 1. If it is false, it gives you expression 2.
What he's doing there is chaining them together, so if the condition is false, it gets evaluated by the next ternary expression.