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 trialMatthew H
6,627 PointsStage 3 challenge
I really don't know where to begin with this. any advice? Feel lost this whole unit - like I'm in the wrong level class.
"Challenge Task 1 of 2
Take a look around at the app.js and index.html files. In this task we're going to remove the pleaseEnableParagraph from the body. Do that around line 7. "
Matthew H
6,627 Pointssorry of course that would make sense to post the question and code. This is my 3rd Java course. Others were fine; this one is just difficult for me. I think I'm supposed to use .removeChild but am not sure how to formulate.
The original question:
Take a look around at the app.js and index.html files. In this task we're going to remove the pleaseEnableParagraph from the body. Do that around line 7.
var body = document.body; var newParagraph = document.createElement("p"); var pleaseEnableParagraph = document.querySelector("#please_enable");
Barry Barnes
18,631 PointsI feel lost too. Like there was too much of a skill jump. Most of this stuff isn't making sense to me.
2 Answers
mikes02
Courses Plus Student 16,968 PointsOK, so in this case you're going to want to use the removeChild function. It's asking you to remove it from the body, which we have stored in:
var body = document.body;
We have the paragraph they are referencing stored in a variable as well:
var pleaseEnableParagraph = document.querySelector("#please_enable");
So, in order to remove that paragraph, we are going to combine some variables with the removeChild function, like so:
//Remove "Please Enable JavaScript" paragraph
body.removeChild(pleaseEnableParagraph);
With that, you accomplish that task.
Matthew H
6,627 PointsAha! I was using quotes inside the (). thanks so much
Barry Barnes
18,631 PointsYeah, I had it kinda backwards.
'remove.body(pleaseEnableParagraph);'
I'm going to push through this lesson. Hopefully, something will stick.
mikes02
Courses Plus Student 16,968 Pointsmikes02
Courses Plus Student 16,968 PointsFor better assistance it's always best when you can post your code along with your question, it will help others troubleshoot the issue for you. If you need help properly formatting your code, you can use the Markdown Cheatsheet that Treehouse provides when posting.
As for the level of the class, did you start with any of the introductory courses to JavaScript before jumping into this one? Like JavaScript Basics, JavaScript Foundations, or jQuery Basics?