Javascript if Else Explained
Javascript if Else Explained
1) The if Statement
The simplest form of conditional statement. It executes a block of code only if a condition is true.
Example:
Executes one block of code if the condition is true and another block if it is false.
Example:
} else {
Example:
console.log("Very good!");
} else {
Summary