Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript and the DOM (Retiring) Getting a Handle on the DOM DOM Selection - More Review

What is wrong with my answer? document.querySelectorAll (".studentInfo");

I don't understand what is wrong with my answer?
const studentInfo = document.querySelectorAll (".studentInfo");

2 Answers

Thank you so much Dale.

Steven Parker
Steven Parker
229,744 Points

The only question I saw that would be close to this asks for "a reference to all elements in a document with the class student-info", but this code selects the class "studentInfo" instead.

You should also remove the space between the method name and the parentheses that enclose the argument. This would not be an issue in real code but it seems to confuse the quiz validator.

Thank you Steven really appericate i spent over an hour trying to figure this out. Thank you.