I just can't put 2 and 2 together whens it comes to JS

I’ve been learning front-end development for maybe a month now - I started off doing things in a strange order, hit reset after about a week or so and then went back and did the HTML and CSS certification (which made sense), I thought it would be logical to do JS next - my brain is now fried!

My problem is that I can’t figure out the context for when to use statements. I’ve followed project-based youtube tutorials and worked my way through some of fCC’s JS certification, I’ve also been going through WS3 and I can read code OK (for having only done it for ~ 2 weeks). My brain just can’t figure out why or when I would use a function or array or JSON etc.
I’ll have a set of instructions but I can’t then think “Okay so I need to loop through an array here, add a function here.” etc.
Does that make sense? I’m rather determined to feel confident with JS as front end would be a very suitable career for me but I’m struggling to get over this hump. I thought “Let’s try just playing around with things, I’ll aim for something simple like a website that shows the date and time.” but as soon as I open a JS document I go entirely blank and have no idea where to start. Advice? I know it’s not going to be an overnight miracle and most people take months/years to have a good understanding of using JS but I just need a little nudge over this hill :sweat_smile:


This is completely understandable, and normal. I think the majority of people struggle with this when they are starting out. I know that this was an issue for me when I first started learning. Learning for a month is not a lot of time when it comes to this, and depending on what you were doing for that month the results of understanding can vary. The challenges here are great for being introduced to the logic, syntax and knowledge of how stuff work, but in my opinion the actual understanding comes when you are working on a actual project where you have to think through and decide what needs to be done.

There is a ton of information when it comes to coding, and it is impossible to know everything and even remember everything. I have a job as a developer, and I forget stuff all the time. I spend a part of my day googling things to refresh myself, and even stuff I didnt know in the first place I google and then put to use in my code and this is common for all developers to do. So, dont feel down that you go blank because it happens and its normal. Again, a month is not a lot of time to really understand all of this, think of it as you are still getting your feet wet.

I like your approach of making a simple website, again in my opinion the understanding of how all this really works is when you are putting it into practice. I would keep with that approach of trying to build something small, but when you get stuck dont feel bad about having to google for an answer. Or you can always ask on here if you get stuck, the general developer rule we have at work is if you are working on something and stuck for an hour then you need to reach out to someone for help. You don’t want to be spending hours on something because that just makes you irritated and slows everything down. Then after you figure out how something is used in your first project, chances are you are going to remember or have a better understanding on the next thing you build. Then slowly as you keep building things the number of times you needs to google or ask questions decreases.

I know I probably through a lot at you lol, but don’t be afraid to ask questions, google is a developers best friend, and where you are at right now is completely normal. If you have to you can even keep a list of notes, for example write down what an array is, what it does, what it is typically used for. Then as you are working you always have those notes to flip back to if you get stuck.


To me your statement seems to be asking answers for these questions:
“Why doed array exist? Or function? Or JSON?
How are they useful?
Why do we even need them?”
and many more. You might be struggling to find logical answers to them, answers that’d make sense to your brain and would help you to understand how software development works.
Before you try to understand why something exists in software development. Ask this question to yourself :

“What problem does it solve?
How can I put this in use?
What more will I be able to do with it?”

Asking these questions will make your brain understand the reason behind their existence. And it also helps you think logically, which is one of the key traits that every developer has, and it is something that everyone develops during their development journey.

What if I tell you to create a list of your favorite movies in JS and store them in a single variable?
The answer would be to store them in an array cause array works as a list, which can store multiple data of any type (string, number, boolean, object, null) and can be easily accessed by their index number.

What if I tell you to print that list on a page when a user clicks a button?
The answer would be to call a function on a user click that triggers a loop written inside, which goes through every element in the array and renders/prints them on the page.

What if I tell you to send your user’s form data to the server to store it in the database?
The answer would be to create a JSON object to store the user data, and then send it to the server. Because JSON is a type of data format that’s identical to a javascript object. Hence, named JSON(Javascript Object Notation). Which can be used to transmit data from both client-side and server-side.

By now you should already have a fair idea of why these things exist and how useful they’re in building softwares/applications. And what we wouldn’t be able to do, if we didn’t have them.
I hope I could get my point across. We believe every human is capable, and if others have done then you can too!!
Trust the process even if it hurts. Struggling means you’re heading towards the right direction.


I just got my FCC JS certification and so I think for you it better to try again and again. In the end your brain will iterate seamless

1 Like

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