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 trialOliver Bannister
5,143 PointsChallenge task 2 of 2 - After line 9, append the newParagraph to the body.
Hi, does anyone have an answer to this. Nothing is working and I can't find an answer.
Thanks
Oliver Bannister
5,143 PointsAll sorts at the moment.... maybe it's late! I think I'm trying to alter this...
var listItem = this.parentNode; completedTasksHolder.appendChild(listItem);
but not getting anywhere.
5 Answers
Oliver Bannister
5,143 PointsHi, I've cracked it...
body.appendChild(newParagraph);
Jason Anello
Courses Plus Student 94,610 PointsGlad you figured it out.
Jason Anello
Courses Plus Student 94,610 PointsI'm not sure if you've linked to the right challenge here.
Do you have something like this for task 1?
body.removeChild(pleaseEnableParagraph);
Task 2 is very similar to that but you would use appendChild()
instead and you would be appending newParagraph
Oliver Bannister
5,143 PointsThanks, I made a meal of task 1, so task 2 wasn't obvious.
MUZ140639 Elda Mufandarambwa
6,061 Pointsbody.appendChild(newParagraph);
bummer: Did you use the appendChild() method on the body .
please assist me this is the response i am getting on the above code
Jason Anello
Courses Plus Student 94,610 PointsHi Elda,
Where did you place that code? I tried your code for task 2 and it passes fine.
MUZ141116 Tafadzwa Paza
12,893 Pointshey Elda your code works also tried it and it worked.
MUZ140639 Elda Mufandarambwa
6,061 Pointshie Jason Sorry for late response but i think my network was just bad, coz it worked later. Tafadzwa, it did later. Thanks guys
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Oliver,
What code are you trying?