Remove dead code

Remove dead code

Tags
Clean Code
Javascript
Software Development
Published
Published July 25, 2022
Author
Due Date
☑️ Topic: Functions
 
☑️ Idea: Delete code that isn’t executed. It will still be in your git history if you need it.
 
☑️ Benefits: Maintainability
 
☑️ Guideline: If you find conditions that are never true, the code after those conditions is dead code.
 
// BAD function oldRequestModule(url){ // ... } function newRequestModule(url){ // ... } // GOOD function newRequestModule(url){ // ... }