JavaScript if…else is a conditional statement that is used to check wether a condition is true or false to take a decision.