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 trialKatharine Cooney
4,612 PointsUsing the Console
In the video, when he types document.head.children (for example), the return contains the title tag, along with the titles name, and the link tag, along with the link's attributes.
When I type the same thing into the console, I just see the words "[title, link]". I clicked on the title thinking that maybe I would see the title's name but it just shows a bunch of information I don't understand yet.
Has anyone experienced a similar issue? Is there some setting in the console I need to adjust? Thanks for any help!
3 Answers
Steven Parker
231,275 PointsAre you using a different browser?
He seems to be using the console of Chrome devtools. If you have a different browser, it may have a different console behavior.
Also, is there a little black triangle on the line you see that you can click on to expose more detail?
Keith Ostertag
16,619 PointsI too would like this explained. I've tried it in both Chrome and Firefox- with the code loaded locally (so as not to have the developer tools console looking at the Teamtreehouse video page!) and still see only {title, link} as Katherine originally states. Clicking on the downward pointing black triangle only expands and doesn't give what Andrew shows. Perhaps it is a version related issue? Very disappointing to run into these types of functionality issues!
It is also unfortunate that this video does not include a "Launch Workshop" link... I guess it assumes you have already done so. But As Far As I Can Tell that wouldn't help as the console would be looking at the Workshop code, not the code samples we are working on. Can anyone enlighten us on this?
Keith Ostertag
16,619 PointsFurther addition: I see that a later console command Andrew shows does give exactly what he shows.
Whereas the first command "document.head.children" does not give what Andrew shows, this console statement "document.body.children[0]" does give me exactly what Andrew shows in the video (using Chromium version 57.0.2987.98 on Linux).
On further exploring, I find that I can get close to Andrew's first result by modifying it with array indexing such as document.head.children[0]
and document.head.children[1]
etc as shown later in the video.
Nigar Sadiqli
10,281 PointsI have the same problem and I am using Chrome..