Review this code snippet. Identify 3 issues and suggest fixes: performance, style, and potential bug.
Click Run to test your code