Malesela Kgobeā¢ 555
@M-Kgobe
Posted
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 mutliple eventlistener
, you could use a ForEach
function to iterate through classes you click on.
Marked as helpful
0
Aleksandraā¢ 360
@alexattt
Posted
@M-Kgobe thanks for suggestion! Will try that out indeed.
0