In Javascript, a variable value can be set based on a condition. This "shorthand" avoids writing an if/else structure:
<variable> = (<condition>) ? <value1> : <value2>
Where <variable> is set to <value1> if <condition> returns True or <value2> if <condition> returns false.