Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję0
Need help with JAVASCRIPT DOM Quiz!
This below quiz is from changing elements. What is the array number? And how to find it? var s = document. getElementsByTagName("span"); for(var x=0; x<s.length;x++) { s[ ].style.backgroundColor = "#33EA73"; }
2 odpowiedzi
+ 2
x.
s contains an array of span elements. you are looping from 0 until the last index of the array and storing that in x. so s[x]. style.etc is what you want.
+ 1
Thanks!