JavaScript if…else Statement
The javascript if else statement in JavaScript is a conditional statement that executes a block of code if a specified condition is true, and another block of code if the condition is false.
-
if statement
if statement is the most basic conditional statement. It implements a block of code only when the given condition is true.If the condition is false then implementation leaves the block and jumps to the next section.