re: A New Coding Style for Switch Statements in JavaScript/TypeScript VIEW POST

FULL DISCUSSION
 

Simple if... else statements will not hurt if the conditional checks are short enough. It does help improve code readability. But it's your call to use which method that suits you best.

 

I personally like the extra structure that switch statements bring for iterating over possible variations in value.

code of conduct - report abuse