JavaScript Control Structures (Loops and Branches).
JavaScript supports the following forms of if..else statement − if statement if…else statement if…else if… statement. if statement The if statement is the fundamental control statement that allows JavaScript to make decisions and execute statements conditionally. Syntax The syntax for a basic if statement is as follows − if (expression){ Statement(s) to be executed if … Read more