What is the syntax of if.else?

The syntax of the if…else statement is: if (test expression) { // statements to be executed if the test expression is true } else { // statements to be executed if the test expression is false }. If the test expression is evaluated to true, statements inside the body of if are executed.
For More Information Please Refer:


You May Also Like to Read: