0
Why is my variable not being assigned properly?
https://code.sololearn.com/W29aCW6xh9yL I want to simply select the elements by class name, in this case, demo. I prefaced the variable with "var", used the document.getElementsByClassName() method, which should be an array. Yet, when I check the length of the array (in this case by using an alert), the length is zero, which means that my variable assignment didn't actually grab any of the elements. What am I missing here?
1 Resposta
0
Thank you so much! I new it must be something so simple, but it was driving me crazy!!