Conditional Expression in TypeScript
Conditional expression (?) is the shorthand method of the if else statement in TypeScript. In the below program, I will create an enum object and then find out which enum value the user has entered into the function and display the message accordingly with conditional expression. The conditional expression statement above makes the program simpler…