Why is this null?
MikeJMS8910 (234)

So I have been working on a script - document.body.querySelectorAll(".page")[z].querySelector(".student-list").querySelector(".student-item cf") - but when I run it, it says that it is null.

here you can see the elements in the console and it shows that there is an element with the id of student-item cf. So how can I make this work? Thanks.

You are viewing a single comment. View All
Coder100 (18926)

oh i see

you forgot the discrim, you need the . in front of it to say it is a class not an element!

MikeJMS8910 (234)

@Coder100 o my gosh I swear I quadruple-checked that thank you so much!