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 trial

JavaScript

Code problems...

Guys, on the course "Interactive Web Pages with JavaScript", "Selecting Elements" challenge, objective #2, if I paste the code below:

var fullName = document.getElementById("full_name"); var lastName = document.getElementByTagName("span")[1];

The previous objective stops passing. Can you tell me what's wrong?

Thanks,

Emilio

2 Answers

The second line should be

var lastName = document.getElementsByTagName("span")[1];

Yes, your answer should be as above. The difference being that you are missing the character s in your method name. document.getElementsByTagName

Thanks, guys, that was it! The funny thing, though, is that it started telling me that task one was no longer passing instead of giving me a syntax error. But I guess workspace is not a full compiler, hence why... :)

yep, you can occasionally get incorrect messages, which can be related to how verification of a task is accomplished (which varies)