DEV Community

Discussion on: A New Coding Style for Switch Statements in JavaScript/TypeScript

Collapse
 
nebrius profile image
Bryan Hughes

Correct, this was for demonstration purposes, and I agree that in practice I'd just inline the call in this case. I'll tweak the examples to make this more clear, thanks! My actual code that prompted me to write this did 3 things with the entry variable.