Welcome to the Treehouse Community
Looking to learn something new?
Joshua Bivens8,586 Points
"Use a method to traverse and select the anchor."
The challenge is to select the anchor tag inside of listItem.
var anchor = listItem;
So I have
var anchor = listItem.getElementByTagName("a");
What am I doing wrong?
Robert BojorCourses Plus Student 29,439 Points
You should use the .querySelector() method and instruct it to for for the a tag.
var anchor = listItem.querySelector('a');
Bug here, I believe. listItem isn't defined elsewhere in the JS. Doesn't ask us to create it either. (Perhaps it should?)