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 trialRobbie Thomas
31,093 PointsOn line 2 of app.js
I have the following code, but sadly, it says bummer.
Any help is appreciated. I also put "p" too and that didn't work.
const contentDiv = document.getElementById("content");
let newParagraph = document.CreateElement('p');
<!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 Answers
deebird
7,558 Pointslet newParagraph = document.createElement("p");
Robbie Thomas
31,093 PointsI actually input that at first with the "", and it told me wrong answer. I suppose the folks at TreeHouse made the mistake and fixed it in between the time I asked for help and I got the proper answer (in which I did provide).
deebird
7,558 PointsI think the issue was the capitalization of createElement not the quotation marks, single quotes or double quotes should work
document.CreateElement('p');
vs
document.createElement('p');
eslam said
Courses Plus Student 6,734 Pointseslam said
Courses Plus Student 6,734 Pointsso do you want to append the newParagraph to the empty div ?