Can I only use if and else in a statement in ternary operator syntax or can I also somehow include an else if?
if
else
else if
example:
You could stack multiple ternaries:
var x = (y) ? 1 : ( (z) ? 2 : 0 );