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 Interacting with the DOM Traversing the DOM Getting All Children of a Node with children

Keith McGill
seal-mask
.a{fill-rule:evenodd;}techdegree
Keith McGill
Full Stack JavaScript Techdegree Student 6,852 Points

Line 10, 'remove' class?

Hello,

I am wondering where this 'remove' class is coming from that he is assigning on line 10? I do not see it on the css or anywhere else.

2 Answers

Heres where the confusion is Keith. inside his attachRemoveButton() function he chose remove as his name for his document.createElement --> let remove = document.createElement('button'); He probably should of named it removeBtn to avoid confusion. Hope that helps

The remove class is not defined, and there is no reason for it to be in the code. My guess is that he was originally using that class to stylize the button, but then opted for another method, and since it's not hurting anything, didn't bother to remove it from the video.