Make decisions with if/else. Use comparison operators (===, >, <) and switch for multiple options.
// if/else - If cup is empty, refill
if (cupsLeft === 0) {
refill();
} else {
pour();
}
// switch - Menu options
switch (order) {
case "latte": price = 4; break;
case "espresso": price = 2; break;
default: price = 3;
}
Use === (strict) instead of == to avoid type coercion surprises.
===, !==, >, <, >=, <= for comparisons.