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

Ion Vuluta
PLUS
Ion Vuluta
Courses Plus Student 2,402 Points

hi, can anyone help me with this challenge?

i keep forgetting how to assign elements or links to a variable. also i can't figure out how to use a descendant selector in this code.

2 Answers

Hi Ion,

Your question is pretty broad. Depending on what the element is and how many elements you’re trying to select, there are several ways to select an item/element and store it in a variable.

Also, regarding this code (which you mention in your question), you haven’t actually left any code for review. So if you’d like to add your code and narrow your question a bit, I’m sure that I (or others) could offer you more precise guidance.

That said, here are some links to Treehouse courses and workshops, which should clear up things for you:

https://teamtreehouse.com/library/dom-scripting-by-example

https://teamtreehouse.com/library/css-selectors-quickstart

https://teamtreehouse.com/library/practice-selecting-dom-elements

Ion Vuluta
PLUS
Ion Vuluta
Courses Plus Student 2,402 Points

Thank you, Brandon. For some odd reason my code wasn't there.Perhaps I may have deleted it earlier and forgotten. Thank you for your help!