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 Interactive Web Pages with JavaScript Traversing and Manipulating the DOM with JavaScript Appending and Removing Elements

Atanas Sqnkov
Atanas Sqnkov
14,981 Points

Stuck on task 1

Hello everyone,

so I am trying this, but it doesn't work:

var removeParagraph = body.removeChild("#please_enable");

1 Answer

Matt West
Matt West
14,545 Points

Hi Atanas!

Have a look at the variables that have already been assigned in this code challenge.
Could you use one of these instead of "#please_enable" in the call to removeChild ? (hint)

Let me know if you're still stuck :)

Tip: You don't need to assign a new variable for this task, so you can remove var removeParagraph = from your code.

Atanas Sqnkov
Atanas Sqnkov
14,981 Points
body.removeChild(pleaseEnableParagraph);

Yes, I was throwin into oblivion before your response.

Thanks Matt!

Matt West
Matt West
14,545 Points

You're welcome :)

Happy coding!