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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![handy christian](https://secure.gravatar.com/avatar/d2fc1ea50ce1b040215ee8a7bbbfa98f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
handy christian
2,899 PointsPlease help I'm stuck on the event challenge, help me solve this problem
Help
const removeMe = document.querySelector('.remove_me');
let parent = removeMe.parentNode;
removeMe.addEventListener('click', (event) => {
parent.removeChild('removeMe');
});
<!DOCTYPE html>
<html>
<head>
<title>Parent Traversal</title>
</head>
<link rel="stylesheet" href="style.css" />
<body>
<ul>
<li>Hello</li>
<li>Hi</li>
<li class="remove_me">Good bye!</li>
<li>Howdy</li>
</ul>
<script src="app.js"></script>
</body>
</html>
3 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsTask 2 says "Next, remove the removeMe
element from the parent element."
You're pretty close, but I see two issues:
- You don't need an event listener here, just the code to perform the removal.
- The argument to "removeChild" should not have quotes around it.
![handy christian](https://secure.gravatar.com/avatar/d2fc1ea50ce1b040215ee8a7bbbfa98f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
handy christian
2,899 Points:,) i hope someday i can be like you tho thanks
![G Johnson](https://secure.gravatar.com/avatar/83ce7eca9fcabd0046119ea77767157b?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
G Johnson
46,427 PointsThe fix is simple - just remove the quotes around 'removeMe'. Tested on code pen.
No quotes are needed because this is a variable that you set to represent the dom info.
![G Johnson](https://secure.gravatar.com/avatar/83ce7eca9fcabd0046119ea77767157b?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
G Johnson
46,427 PointsSteven Parker .. stated this first I see.
handy christian
2,899 Pointshandy christian
2,899 Pointshi Steven Parker, i saw your profile you have a lot of javascript points. I just want to know how old are you and what kind of job you get hired right now? I just want to know so i can be motivated to learn more about programming :D
Steven Parker
230,688 PointsSteven Parker
230,688 PointsLet's just say "
When I first started learning about programming, punched cards were a common input medium, and computers took up a whole room.
Math.log(my_age) > 4
".I was already a software engineer (mostly C/C++) when I learned JavaScript. I do more web-oriented stuff now, which is why Treehouse has been great for expanding my skill set.