define "refactoring"
Refactoring is changing code to make it better (improve performance, etc) or easier to work with without changing the output.
Refactoring changes code to make it shorter, more efficient, or easier to read and understand. You do it like how you write a document draft that meets the main intent, and then edit and refine your words to improve it.