if…else Statement
The JavaScript if…else statement executes a block of code when the specified condition is true. When the condition is false the else block will be executed. The if-else statements can be used to control the flow of execution of a program based on different conditions. While writing a program, there may be a situation when you need to adopt […]