TypeScript – If…else Statement
An if can be followed by an optional else block. The else block will execute if the Boolean expression tested by the if statement evaluates to false. Syntax if(boolean_expression) { // statement(s) will execute if the boolean expression…