0
Why this js code not working:((??
https://code.sololearn.com/WFZSI625fwKw/#html which part of this js code is wrong and how to fix?
3 ответов
+ 6
if (x[0].textContent.includes("posts")) {
not x
"Elements"ByClassName not "Element"ByClassName ,(notice the s after Element)
So basically Elements one returns a node list with all elements having similar class name and you need to specify by indexing which one you wanna select out of it
+ 2
Although insignificant, also notice that you have unnecessary { bracket at line 33, and its counter } bracket at line 39.