Javascript – Can you assign an element's class list to a variable by clicking on the element?
The main question I have is: Is there a way to assign to a variable an element's class list by clicking on said element without directly referencing the element in the JavaScript. Expanding on this, I'm trying to create a…