javascript if
if (condition) {
// block of code to be executed if the condition is true
} else {
// block of code to be executed if the condition is false
}
//example
var money = 200;
var price = 159;
if (money >= price) { //if money is higher or equal to price
alert("you have enough money")
} else {
alert("you don't have enough money")
}
// you can add another condition to the else
if (age < 18) {
alert("too young")
} else if (age > 80) {
alert("too old")
}