Design comparison
SolutionDesign
Solution retrospective
First solution of this year. šš
Community feedback
- @M-KgobePosted almost 3 years ago
Hi Nice work on this one.
I have a suggestion to reducing your JS lines of code. since your dropdown elements have similar classname, instead of getting your elements one by one, you could assign them to one variable by using
querySelectorAll
/getElementsByClassNames
, therefore instead of having mutlipleeventlistener
, you could use aForEach
function to iterate through classes you click on.Marked as helpful0@alexatttPosted almost 3 years ago@M-Kgobe thanks for suggestion! Will try that out indeed.
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