if...else statements check whether a given condition is true or false, then run different blocks of code accordingly.
javascript
const time = 14;
if (time < 12) {
console.log("Good morning!");
} else if (time < 18) {
console.log("Good afternoon!");
} else {
console.log("Good evening!");
}You should see
Good afternoon!