Refactor a JavaScript snippet for better readability and performance
Refactor the following JavaScript code to improve readability and performance: [JS_CODE_SNIPPET]. Ensure the refactored code follows best practices and maintains the same functionality.
Use this when you need to optimize and clean up existing JavaScript code.