DEV Community

Discussion on: Inline switch statements in javascript?

Collapse
 
balastrong profile image
Leonardo Montini

Sure, wrapping the switch inside a function is a good way and IIFE looks like a really smart and concise solution, thanks for sharing! :)