DEV Community

Discussion on: Keeping your code clean by sweeping out "if" statements

Collapse
 
nathanielkblan profile image
Nathaniel K. Blanquel

I'd have to say that I agree with this. If you have a program that requires many if-else statements and each produces a related result and those statements need to be ran again and again in a similar fashion but with different inputs, then using a map to mock these statements would make debugging easier.