DEV Community

Discussion on: How would you refactor this JS function?

Collapse
 
jamesthomson profile image
James Thomson

Extra bonus points for renaming the function. This would be my first improvement. Even if you left the function as is and just renamed it to describe its purpose that's a huge improvement in my book.