Design Patterns · Junior · Question 58 of 75
Why is a very long function considered a code smell?
- ✓Correct answer: It usually does several things, is hard to understand, test and reuse
- 2Long functions run slower
- 3JavaScript limits function length
Explanation
If you need comments to explain sections, those sections are candidates for extracted functions.