JavaScript If Else Ladder
Statements - Conditions - if-else ladder
if…else ladder :
if...else ladder is used to check for a new condition when the first condition evaluates to false.
Ternary operator :
Conditional operator evaluates to one of the values based on whether the condition is true or false.
It happens to be the only operator in JavaScript that takes three operands. It is mostly used as a shortcut of 'if-else' condition.