Design comparison
SolutionDesign
Community feedback
- @sakthivel155Posted 3 months ago
Hi @Steven-Ang,
I suggest optimizing your code by using the
classList.toggle()
method instead of individuallyadding or removing
classes. This approach simplifies the code and enhances readability.0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord