Refactor for readability
Refactors messy code into clean, idiomatic, well-named code without changing behavior.
CO
0 uses
Variables
Prompt(live preview)
Refactor the following code for readability and idiomatic style. Do not change behavior. Improve: variable names, function decomposition, early returns, removal of dead code, consistent formatting, and comment quality (delete obvious comments, add comments only where intent isn't clear from code).
Language: {{language}}
Code:
{{code}}
Return only the refactored code in a single block, then a short bullet list of what you changed and why.