Staying Motivated

What happens if you lose momentum in JavaScript over and over again? I really enjoy html/css and really enjoy working with it on FCC and codepen, but I am on section 166 of JavaScript and it is taking me a very long time to complete. It’s like I can’t make JS click in my mind. I want to learn JS but I am having a hard time understanding how apply it or how to make it a skill or how to use even use it?? I don’t even know how to state what I’m thinking about it…more or less I guess I am just throwing this out there lol

That’s normal when it comes to programming. People naturally don’t think in codes. We think in solid, concrete ideas. That’s why HTML/css is more appealing because you get instant response from the browser. With code, you don’t really get that, it all happens in the mind first and then in code, then you finally get the see it.

When it comes to practical application. Think of website 20 years ago. We don’t have all these fancy languages to make things easier, everything is code from scratch. You don’t have push, pop, shift to make your life easier.

One application for the use of Javascript was to validate text field to see if the user entered something valid or something else. For example: did the user enter a phone number instead of a name. Is the email address correctly format? Is there a state XIZ?
Mind you, no regular expression either. you get the idea… (hopefully)

Now Javascript has developed beyond what its intended purpose is.

It can change CSS in the code.
It can change HTML elements with DOM.
It can build small personal application.
It can build games.
It can access Database.

I think the down side of FCC is that you don’t get to write codes very often. The challenges are very self explanatory. When I used to learn programming as a hobby. I would write a fresh new project for every idea that comes to mind and poke around the possibility of what I am writing.

For example, if I want to try out something in HTML/css with image-background. I would start a fresh project write from beginning so that i’ll know how everything is written. With programming like C/C++, Javascript, etc. I would write on paper in concept and then try to code them.

The key here is to code a lot.
Do a lot of hard projects (Whatever you consider hard)

Here is one for you.

Write a script that plays a “guess the number” game as follows: Your program chooses the number to be guessed by selecting a random integer in the range 1 to 1000. The script displays the prompt Guess a number between 1 and 1000 next to a text field. The player types a first guess into the text field and clicks a button to submit the guess to the script. If the player’s guess is incorrect, your program should display Too high. Try again. or Too low. Try again. to help the player “zero in” on the correct answer and should clear the text field so the user can enter the next guess. When the user enters the correct answer, display Congratulations. You guessed the number! and clear the text field so the user can play again.

1 Like

Wow! I really appreciate you taking the time to really talk with me. I will be honest, I have never really got on forums or chats. I would say that learning code and FCC is definitely not what people would expect coming from me. My interests has always been mechanical(auto, auto body, industrial mechanics), so when my interest was sparked by something in this field, to me, it is exciting to begin but at the same time I have not got the background to feel comfortable. I am also kinda use to being pretty decent at anything I attempt but as I’m sure you know with this much of a change in thought process it can be hard for a new guy to feel like he’s making any head way. Especially, when I have nothing to compare my work or progress to.
Thanks again for your reply.