In addition to if…else , JavaScript has a feature known as a switch statement . switch is a type of conditional statement that will evaluate an expression against multiple possible cases and execute one or more blocks of code based on matching cases.
Read more