Design Patterns · Junior · Question 56 of 75
What is the Extract Function (Extract Method) refactoring?
- ✓Correct answer: Moving a fragment of code into a separate, well-named function and calling it from the original place
- 2Deleting unused functions
- 3Combining several functions into one
Explanation
A good name replaces a comment and makes the fragment reusable and testable on its own.