JavaScript Conditionals - Switch Statement, If, If-Else, Nested If, Ternary

preview_player
Показать описание
Easy to understand lesson on conditionals in JavaScript
Conditionals are used to make decisions in the codes. They are used to check if certain conditions are met, upon which some pieces of codes can run.

We are going to look at the conditionals: the if and switch statements, with all their variants, as well as ternary operator.

if
if-else
if-else-if...else
Nested if, if-else

switch statement
switch default case

Ternary operator
Рекомендации по теме