Conditional statements in JavaScript are used to select to execute a block of code following a condition. It means that if the result of an expression is true or equivalent to true, the block of statements under that condition is executed.
Conditional Statement