Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics Making Decisions in Your Code with Conditional Statements The Conditional Challenge

I feel like a deer in headlights

I am going through these JavaScript courses, but cannot do these challenges without looking at the solution. I don't feel like I know where to start even though I just went over these concepts. It's disheartening and makes me feel inadequate to learn this stuff.

5 Answers

Hi!

I know how you feel - I have been there myself.

I have found that learning coding can be frustrating because in many ways a great deal of ANY code syntax (regardless of the language) can be extremely non-intuitive. In fact, in many cases, it is ONLY the way it is because that's just how the developer(s) decided it should be - with no necessary rhyme or reason to it (sometimes they can make it relatively intuitive, but often it can be downright arbitrary).

For example, when I first started learning UNIX terminal commands, they seemed absolutely arbitrary. Once you learned them, they were actually very easy to grasp and actually made a lot of sense, but without reading about them or have. someone else teach them to you, there was ABSOLUTELY NO WAY to figure any of it out. They use a lot of abbreviations, so typing is minimal, but it also makes many of the commands downright cryptic. Many switch flags are just one letter, so guessing what the flag does can next to impossible - there's no way to know without documentation.

For example, in the Git command:

> git commit -m "Added new paragraph"

-m is the message flag, allowing you to use "Added new paragaph" inline and not requiring a text editor.

git commit is pretty self-explanatory, but the -m gives nothing away to inform you of its purpose.

When I got started, I literally bought a UNIX for Dummies book, and within the first ten pages, I could do A LOT, without which I didn't have a clue. Before that, the UNIX dumb terminal was a complete baffling mystery.

Anyway, one thing I highly recommend (as does Guil) is to tap into any/every resource OUTSIDE of Treehouse to round-out and expand your knowledge and understanding of JavaScript (and HTML and CSS) and have them handy in other browser tabs for reference - you can't remember everything.

I also recommend taking every beginner course offered by Treehouse on HTML, CSS, and Javascript.

In fact, if you are not strong in HTML and CSS, I would plow through those courses first, then resume the JS, it will make understanding JS a whole lot easier.

Also, I go back and forth between JavaScript, PHP, and Python all the time, which are syntactically different in many significant ways, therefore, without reference docs - I'd be dear-in-headlight half the time, too!?!

Some recommended third-party resources:

https://www.w3schools.com/

https://www.freecodecamp.org/

https://developer.mozilla.org/en-US/

https://css-tricks.com/

https://www.youtube.com/user/derekbanas (His videos are BOMB - he talks fast, so he covers a lot and you don't end up waking up in a puddle of your own drool!?! LOL)

I hope that helps.

Stay safe and happy coding!

BTW, one other thing I would suggest is try to test challenge code outside of the challenge, when necessary.

One thing I don't like about some/many of the challenges is you don't often get to see the RESULT of the code.

Either that or the "Bummer" message doesn't really reveal what the error is very accurately.

So, I often go here:

https://www.w3schools.com/js/tryit.asp?filename=tryjs_array

And paste in my Treehouse code and see if it behaves as intended or expected (and I often have to add a little extra code that is not part of the challenge, say to log a result to the console).

This way I can actually go through formal debugging procedures to help me pinpoint my error(s).

For Python I go here:

https://www.katacoda.com/courses/python/playground

Anyway, I hope that helps.

Stay safe and happy coding!

Mark Ryan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Mark Ryan
Python Web Development Techdegree Graduate 28,154 Points

Hi, odysseywow. You've done the right thing by coming to the community with this. I'd like to share with you that, in my short journey of coding, I too have felt this way before. It seems to be a pretty common feeling actually. We're doing hard stuff! If I have any advice to offer it's this: things do get better. As long as you continue to show up and invest some of your time, things will fall into place. As prepared as that statement seems, this really is the way I've seen things go.​

Here a few things that have helped me personally:

  1. Seek out other sources of information. After learning a difficult concept here at Treehouse, I'll usually seek out Youtube videos, books, blogs, etc, to offer my mind diversity in medium and presentation of concepts. Then I come back to Treehouse to redo courses (that's my preference). Usually I'll pick up more information the second and third time watching a course.

  2. Build everything. Make sure part of your time is dedicated to hands on coding projects. Build your projects, not tutorial projects. Start small. This is where you'll fail frequently and consistently. Failure is where the opportunity to learn is! This is just another way of learning.

  3. Don't over do it. This is a long journey, not a short one. Give your mind and body the rest it needs to achieve these amazing things.

I hope any bit of this helps!

Karina Rogers
seal-mask
.a{fill-rule:evenodd;}techdegree
Karina Rogers
Front End Web Development Techdegree Student 10,371 Points

Hello! I too opened this challenge and thought "where do I even begin!?" Being a newbie coder, I thought it'd be relevant to share my thought process on working through this particular code:

First I scanned the directions for any part that looked doable - step 4 stood out because we have used the prompt method multiple times so far. So I wrote out my 5 questions using "const questionOne = prompt('question here?');" (Obviously this is not my exact code, I'm trying to explain my thought process, not give explicit answers)

Next, using a similar start to the number guessing game challenge, I set let score = 0 in step 1.

Then, using my notes, I wrote out a rough draft of step 6 using querySelector() and innerHTML: "You've earned X points and Y crowns".

Then I was stumped again. Eventually, I figured the only code we've been using is 'if else' statements so I wrote out my answers using that... if questionOne = correct-answer-here then +1 to score. I did this for each question.

Next, step 5 seemed like it also needed a function so I tried to apply my if/else statements to that too. 'if score = 5 then gold medal' else 'if score = 3 or 4, silver medal', and so on.

In the end, I had a working code that asked questioned, displayed the # of correct answers and a corresponding metal. I kinda skipped over steps 2 and 3 but since my code was working, I went on to watch the how-to video to see how I could have improved.

Thanks for sharing your frustrations. Hopefully, this shows that some of us are in your same boat! One small step at a time, right? =]

Jessica Bardoulas
Jessica Bardoulas
2,238 Points

Thanks for posting that. It's helpful to see other people don't find this super intuitive. I started reading these comments because I too feel out of my element and not sure how to complete this challenge without additional resources. I don't have any helpful advice but can say that I agree with your comments and it doesn't mean we are not still learning, it just may take a little longer for it all to sink in.