How To Code in JavaScript How To Use the Switch Statement in JavaScript Subscribe How To Use the Switch Statement in JavaScript 8 How To Use the Switch Statement in JavaScript PostedSeptember 11, 2017 59k views JAVASCRIPT DEVELOPMENT By: Tania Rascia Introduction Conditional statements are among the most useful and common features of all programming languages. "How To Write Conditional Statements in JavaScript" describes how to use the if, else, and else if keywords to control the flow of a program based on different conditions, which in JavaScript are often the result of user input. 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. The switch statement is closely related to a conditional statement containing many else if blocks, and they can often be used interchangeably...