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 trialChuck Comstock
Full Stack JavaScript Techdegree Student 8,212 PointsNot sure what is happening here. I would appreciate help!
let aLink = document.querySelector('a#link'); aLink.textContext = inputValue.value;
let inputValue = document.querySelector('input#linkName').value;
let aLink = document.querySelector('a#link');
aLink.textContext = inputValue.value;
<!DOCTYPE html>
<html>
<head>
<title>DOM Manipulation</title>
</head>
<link rel="stylesheet" href="style.css" />
<body>
<div id="content">
<label>Link Name:</label>
<input type="text" id="linkName">
<a id="link" href="https://teamtreehouse.com"></a>
</div>
<script src="app.js"></script>
</body>
</html>
3 Answers
KRIS NIKOLAISEN
54,971 PointsinputValue already is the value so you don't need inputValue.value. Try task 2 in one line of code without the variable.
Chuck Comstock
Full Stack JavaScript Techdegree Student 8,212 PointsThanks guys! I found all this and fixed it. I couldn't figure out a way to remove my question. I appreciate your help!
kevin curtis
15,287 PointsNo worries Chuck. Leaving the question there could be beneficial to someone else having the same problem, so it's all good.
Chuck Comstock
Full Stack JavaScript Techdegree Student 8,212 Pointsthat is true!
kevin curtis
15,287 Pointskevin curtis
15,287 PointsHey Chuck,
InputValue is already assigned as a variable in that challenge so you can remove the 'let,' it doesn't need to be assigned a second time.
Also, as Kris said, drop the .value from inputValue because you already got that value on the previous line. And lastly, you're also using textContext when it should be textContent.
So you should end up with something like this: