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
Leslie Sanchez
10,451 PointsOn line 2 of app.js, traverse to the parent element of the removeMe element.
HELP I've been stuck on this
6 Answers
Steven Parker
243,356 PointsHave you tried using the parentNode property?
It's a bit of a guess without a link to the course, but perhaps something like this:
var parent = removeMe.parentNode;
To enable the most complete and accurate analysis, always include a link to the course page you were working with, and show the code you've written so far
Matthew Tran
16,343 PointsThe answer to this question is below (basically what he said up there, but the variable they wanted was parent, not myParent:
var parent = removeMe.parentNode;
Matthew Tran
16,343 PointsI am going through the course right now, got stuck and searched for the answer and came across this post. Used your answer to complete the challenge. Thanks Steven.
Steven Parker
243,356 PointsSo I got "two birds with one stone" then. Glad it helped!
Carlos Feliciano
5,081 PointsI tried the following and it worked:
```var removeMe = document.querySelector('.remove_me'); var parent = removeMe.parentElement;
Omar Ocampo
3,166 PointsCorrect answer, thanks to everybody for a soon response, it's very important to continue up when you are in
var parent = removeMe.parentNode;
Damion Samuels
7,624 Pointsvar parent = removeMe.parentNode;
Vik Mi
266 PointsVik Mi
266 PointsPlease explain the answer