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 DOM Scripting By Example Editing and Filtering Names Fix DOM Manipulation Code

Christian van Lierop
Christian van Lierop
13,758 Points

How can I skip a challenge?

I'm in the situation now, where I don't know the solution to a challenge and I haven't received an answer to my "Get Help" question yet. It seems however that I cannot continue learning without finishing the challenge. This means I'm stuck for however long it takes for someone to enlighten me.

If this happens more often in the future, this would be a reason for me to terminate my subscription to Treehouse. I have only limited time in which I cab study and advance. If I'm put on hold every time I don't understand or whem I misinerpret one little challenge, this will be too much time wasted for me.

Hope this way of blocking students from advancing will change rapidly in the future. Or is there a solution to this problem already?

app.js
const laws = document.getElementsByTagName('li');
const indexText = document.getElementById('boldIndex');
const button = document.getElementById('embolden');

button.addEventListener('click', (e) => {
    const index = parseInt(indexText.value, 10);

    for (let i = 0; i < laws.length; i += 1) {
       let law = laws[i];

       // replace 'false' with a correct test condition on the line below
       if (indexText.value >= 1) {

           law.style.fontWeight = 'bold';
       } else {
           law.style.fontWeight = 'normal';
       }
    }
});
index.html
<!DOCTYPE html>
<html>
<head>
  <title>Newton's Laws</title>
</head>
<body>
  <h1>Newton's Laws of Motion</h1>
  <ul>
    <li>An object in motion tends to stay in motion, unless acted on by an outside force.</li>
    <li>Acceleration is dependent on the forces acting upon an object and the mass of the object.</li>
    <li>For every action, there is an equal and opposite reaction.</li>
  </ul>
  <input type="text" id="boldIndex">
  <button id="embolden">Embolden</button>
  <script src="app.js"></script>
</body>
</html>

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Christian! First and foremost, you are not required to do any challenge. You can navigate through the sections of this course simply by clicking the small white dots at the top of the video. Mousing over them will give you an idea of what the next "step" contains. However, a course will not be marked "complete" until you complete all challenges and quizzes.

Secondly, when you ask a question here, you are, for the most part, addressing other students. I do see your other question as posted here about the same challenge. The time stamp between the posting of the questions indicates that they were posted approximately 7 minutes apart. The Community is a primarily student-run resource for other students. We live and work all over the world and donate our time to helping each other. A modicum of patience goes a long way here.

Thirdly, the word "embolden" means "to make bold".

Finally, try checking if the value stored in index is equal to the value of i.

Hope this helps! :sparkles:

Christian van Lierop
Christian van Lierop
13,758 Points

Hello Jennifer. thanks for your response. I posted a question with the same title twice, but here I merely wanted to address the policy of not being able to advance to the next series in a course when you can't solve the last challenge. There seems to be no option to skip it and proceed with the next series in a course, which to me seems like a flaw or a policy that only allows for flawless A+ students to advance. I could be wrong and missed the button or link to advance without finishing that last challenge. Hence my question...

I also (mistakenly obviously) thought that by signing up for a payed course, I would receive help from payed professionals, not volunteers. I must admit, the price is not extremely high so you get what you pay for I guess.

I did know the meaning of the word 'embolden'. However the sentence "We want to be able to enter a 0, 1 or 2 in the text field to embolden the list item with the corresponding index" sounded (and still sounds) very cryptic to me. I have no idea what "the corresponding index" is supposed to refer to. It's probably just me. Not a big deal, apart from the fact that I was done learning new stuff for the few remaining hours I had left...

Anyways. Thanks again for your time and response. I'll tray and solve it with your hint and hope to advance the course as soon as possible :-)

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Again, you are able to skip the challenges. As stated, you will find small white dots at the top of the video which allow this. Simply clicking on the next available white "dot" along the top of the video will allow you to go to the next section. If the challenge is the last part of that section, then you can go back to the courses landing page. Under that you will find Sections further subdivided into "Steps". Clicking the small "down arrow" there will expand the steps and allow you to pick the step you want to view thus allowing you to skip the challenge.