Javascript ternary operator -- what is the condition