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 trialAdam Urteaga
19,503 PointsSelecting Elements Challenge: Task 1 No Longer passes after I answer Task 2
Working through "Interactive Web Pages in JS." My code for Task 1 passes with no issue:
var fullName = document.getElementById("full_name");
Task 2 fails and informs me that Task 1 is no longer passing:
var fullName = document.getElementById("full_name");
var lastName = document.getElementByClassName('last_name');
This is odd as there doesn't seem to be any difference in the line from one task to the next. Tried some reconfiguring to no avail. Maybe my Task 2 is bad, but then why is it telling me Task 1 won't pass?
1 Answer
Jesus Mendoza
23,289 PointsHey Adam,
Try
document.getElementsByClassName('last_name');
and let me know!
Adam Urteaga
19,503 PointsAdam Urteaga
19,503 PointsWow. Yes. I didn't have the 's' at the end of 'Elements.' Thanks so much! Amazing that you can stare at the same thing for 20 minutes and not see what's obviously wrong.