#JavaScript #JavaScript / conditional statement / switch The most basic conditional statement is the if. However, the disadvantage is that if there are many values to compare in the conditional expression, the code becomes longer and less readable. In such cases, it is recommended to use switch. grammar switch ( condition ) { case value1: statement1; break; case value2: statement2; break; ... ..