We’ll be covering the following concepts: So if you’re ready to learn these concepts go to the next lesson— else, read over the concepts, observe the diagram, and prepare yourself for this lesson! The if statement is composed of: The else statement: Here is a list of some handy comparison operators and their syntax: here are three logical operators: Falsy values— or evaluate to false when checked as a condition. The list of falsy values includes: Проверка на логические условия идёт слева направо, что можно использовать с ИЛИ: Ternary Operator The else if statement always comes after the if statement and before the else statement. The else if statement also takes a condition.
if/else if/else statements are read from top to bottom, so the first condition that evaluates to true from the top to bottom is the block that gets executed. The switch keyword Если break нет, то выполнение пойдёт ниже по следующим case, при этом остальные проверки игнорируются. (https://learn.javascript.ru/switch