Welcome to the Treehouse Community
Looking to learn something new?
Need a little help
On line 14 of the app.js, we want to get the anchor (the a element) from inside the listItem. Use a method to traverse and select the anchor.
Patrick Koch34,236 Points
Hello Quintin, The querySelector() will help ;-)
Exp. for your app.js if you write
var incompleteTasksHolder = document.getElementById("incomplete-tasks"); //incomplete-tasks var selecta = incompleteTasksHolder.querySelector("label"); console.log(selecta);
the console shows you the select element, if you have more elements that fit to the enterd selectors, its just shows you the first, its pretty cool you can enter "a" for anchor or a class name like " .editMode". I personally really like the querySelector.
var anchor = listItem.querySelector("a");