Help understanding JavaScript

As you go through the JavaScript courses what are you doing to make you understand the concepts? I find that I am able to pass the challenges by making the answer look similar to the example given but I don’t really understand how it actually works. Then later when I need to use the concept I can’t really apply it because I don’t know the ‘how’. Does the understanding come as you continue or do you need it to progress? Do I just get a piece here and a piece there, and the picture will gradually make sense?

3 months ago, I was struggling with JavaScript, too. What I did was practice the challenges that consists of combining the methods you have learned.

For instance, in the Basic JavaScript section:

  1. Stand in Line - tests your knowledge when combining push and shift methods.
  2. Golf Code - tests your knowledge on else/if statements.
  3. Counting Cards - tests your knowledge on switch statements.

In other words, don’t practice each method, but practice on how and when do use them when you come across complex algorithms.

There is more section that tests your knowledge about combining them, but I personally like the Basic/Intermediate Algorithm Scripting sections.


For practice, try to count cards with if/else, and golf with a switch


I’m currently doing the course and finding the exact same problem. I don’t feel like I’m learning to apply, only learning to copy what appears in the example. But then can’t apply it later for other applications. I think I might start practicing the theory in my own projects, worked well for HTML and CSS learning

1 Like

If i do not understand any piece of code, Python Tutor is actually often helpful.
It basically runs your code step by step. Consider to use it.
Also don’t rush through challenge steps. Try to search for additional info about stuff from challenge step if you don’t have good understanding right off the bat.

1 Like

Are you talking about the example on the challenge page or the solution on the hint page?

Because if you just copy solution code you are not going to be learning much. It would be much better to open a thread and ask for help with your own code.

Reading and understanding the different solutions can be useful, but copying and pasting them blindly will not help you at all.

1 Like

I’m mainly talking about using the example on the challenge page. I have looked at the hints/solution when it took me a while to come up with it on my own. I recently posted a question in the forum instead of looking at the hint. I agree with you, it helped a lot more than just the hint/solution. The answer I received pointed me in the right direction and it helped to shift my thinking.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.