In JavaScript, if..else is the most basic condition statement, it consists of three parts:condition, statement1, statement2, like this: if condition: statementa else: statementb It means that if the condition is true, then execute the statementa, otherwise execute the statementb.If the statementa or statementb more than one line, you need to add { and } at the head and tail of statement in JS, t..