Can you use a switch statement in JavaScript?

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.

Leave a Reply

Your email address will not be published. Required fields are marked *