I'm Doing It But Don't Understand

Ive just started learning JavaScript, completely brand new to coding apart from a 6 week course I did in Uni in 2019.

Im doing the projects but I just feel like Im using the hints/solutions too much to solve them and im scared im not actually learning anything.

I really enjoy this and want to get better but if i started the course from the beginning I dont feel confident I could solve them without the hints a second time.

Is this normal? How do I understand it better as I’m doing it? Its an alien language still at this point.

Yes, it’s normal to struggle with JS if you are a beginner. Regardless of what YouTube influencers want you to believe, JS is actually hard and you can’t learn it in a week :slight_smile:

I would recommend you go back and start over and this time don’t look at the hints, no matter how strong the temptation is. If you don’t understand something you can either try researching it more on your own or you can ask questions here in the forum. Asking questions is part of learning. Struggling is part of learning. Nothing to be ashamed of.

1 Like

Thank you! This makes me feel a lot better actually. I’ll restart and go through it like you suggested. Thanks again :grinning:

Feel free to ask questions because lot of coders would be happy to help you out if you need it. Also learning JavaScript is must so take your time to learn it. I started to learn it too, although I learnt other languages first hence it is coming out nicely for me. Try understand the basics first for example how to create variables, how to create arrays (aka list), how to loop through array, conditionals and nested conditionals (if-else if-if), functions and classes. You really need to learn classes well to become good at programming. In my opinion, classes (instances of class aka object) is really critical for putting all the programming skills together to good use. For example string is a class and it has methods like toUpperCase(), strip(), etc. Iit has property like length etc. Once you understand classes, you really are in good level and your confident will grow exponentially. Every day I revise classes, how classes are utilized, how I can create functions and classes, how I can utilize class methods and its properties etc. Not just in JavaScript, but same applies to Python, PHP, Java and other high level languages

Happy Coding! :smiley:

2 Likes

Thank you! Thats really insightful I will also go over classes daily!

Think classes as recipe for any particular meal. Lets say you wanna make vegetable pie and someone gave you a recipe (class). By following that recipe(class) you can make one pie, two pies or hundred pies. So pie is your object that you can make as many times as you want if you have the recipe that is your class. In programming terms, you can make as many objects (fashionably known as class instance) as you want once you have created a class.

To clarify further, think car as a class. Its actionable cos it can take actions, for example cars can be utilized to transports goods and people right? But car also has other characters for example it has wheels, it has horn, it has gears etc. These in programming term we call methods() which on its own can’t do much but assist car (class) to collectively help cars to carry out certain tasks (transporting goods). So if I have to drive the car, in programming terms I can create statement like car.wheel.drive() where car is the class, wheel is its method() that takes actions and drive() is a method from other class which came from you as human class, human.drive().

These collectively known as Object Oriented Programming aka OOP. Pretty much all high level programming languages are built in through OOP so it really important for you to fully understand OOP.

Any questions, do ask and Happy Coding! :grinning:

Hello @JessicaJac,
In general, most programmers don’t understand the code they write. After a while, they get used to the syntax of the language they use and “think” they understand the code. I recommend that you look at the issues section on github (of an open source project), and you will notice that it often takes years to find an obvious bug.

John Carmack[0]:

I mean, anybody that thinks:
just read the code and think about it that’s an insane statement

when I’m working on like my c++ code I’m always running it from the debugger. You know just I type in the code, I run it many times, the first thing I do after writing code is set a breakpoint and step through the function.
Now other people say: oh I do that in my head … well your head is a faulty interpreter of all those things there.

You can use a debugger(any), Python tutor[1] is good (it has some limitations, it can be used with JavaScript code):

https://pythontutor.com/javascript.html#mode=edit


Notes:

[0] John Carmack:

[1] Python tutor examples:

This video is a step-by-step explanation/solution (using Python tutor) of the lesson “replace loops using recursion” https://youtu.be/_NsEWXD4lJ8

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