Welcome to the Treehouse Community
Looking to learn something new?
Maxence Roy8,753 Points
Task 1 no longer passing?
It looks like my task 1 is no longer passing, but I haven't changed anything to the code for that task.
Any idea what's going on ?
const contentDiv = document.getElementById("content"); let newParagraph = document.createElement('p'); newParagraph.className = 'panel'; newParagraph.appendChild('contentDiv');
<!DOCTYPE html> <html> <head> <title>DOM Manipulation</title> </head> <link rel="stylesheet" href="style.css" /> <body> <div id="content"> </div> <script src="app.js"></script> </body> </html>
2 things are off:
- You are turning things around, append the newParagraph to the contentDiv instead of the other way around
- newParagraph is a var so no need for the apostrophes (')
Try it like this.
const contentDiv = document.getElementById("content"); let newParagraph = document.createElement('p'); newParagraph.className = 'panel'; contentDiv.appendChild(newParagraph);
But the warning is really off. It shouldn't be that task one is no longer parsing. Seen this before a few times.