A cleaner way to write switch statements. — Switch statements can be frustrating. With so many unique keywords (switch, case, break, default) to remember, and the obscure behavior of it’s control flow, it’s one of the most complex primitive constructs you’ll ever learn in programming. A common use for switch statements in JavaScript (and many other languages) is…