4 ms·
I agree, these are contrived examples, but I know that I have reached for inline logic many times in my career. To me another code smell is a scope with too man
by seniorsassycat 8y ago
I agree, these are contrived examples, but I know that I have reached for inline logic many times in my career. To me another code smell is a scope with too many variables and do expressions are a tool to reduce the scope of variables. Refactoring to named functions will introduce another named variables.
Javascript doesn't have private modules so moving logic to helper functions in util modules doesn't reduce scope bloat.