Design Patterns · Junior · Question 59 of 75
What should you do with dead code (unused functions, unreachable branches)?
- ✓Correct answer: Delete it - version control keeps the history if it's ever needed
- 2Comment it out "just in case"
- 3Leave it; it doesn't affect anything
Explanation
Dead code confuses readers, gets "maintained" for nothing and can be bundled to users.