If HTML + CSS are the bones and skin of a website, Javascript is the puppeteer. It's a source of intelligence that can change elements on your site based on rules and conditions that you define. It's also a catch-all for anything that HTML and CSS can't do.
Let's say you have a site with images of dogs, cats, and monkeys. You want a button labeled 'monkeys' to only show monkeys without refreshing your site. You also want the other buttons to correspond to the other animals.
(Assuming animal images are on the site.)
justShowMonkeys.justShowMonkeys.The justShowMonkeys list of tasks might look like this
That's it! We just wrote pseudo-code for that functionality. You can always look up the code syntax and memorize it later. It's important to write out a list like this in plain English before you start.
Computers simply follow our instructions. Our task in programming is to be able to break a problem down into really small steps that combine into a larger more interesting goal.
Students find programming (in our case Javascript) to be the most difficult and time consuming subject to understand. Nobody gets this stuff right away and it's common for people to take a few months to get comfortable with writing code.
If you're not from an engineering or math background, programming is probably unlike anything else you've done. Therefore it is normal for it to take a while and we are here to help you through it.
It might feel like you're hitting your head against a wall and not getting anywhere but I promise that you will have major breakthroughs and they will feel amazing.
You will be making progress especially when it doesn't feel like you are.
That doesn't mean yours is wrong. This causes a lot of stress for students. It's like on Chopped when the 4 contestants get the same basket of ingredients to cook a dish. When the time ends for cooking, they're all sizing up their competitors' dishes concerned that they may be better.
Coding is a lot like cooking. It's all procedure-based and it's rare to have two people do it the same way.
It can be intimidating to read code written by an experienced person. She will solve problems in ways that you would never dream of. Often times though, the result she obtained took several passes on code that was originally really simple.
Issues may have happened along the way that complicated the solution. There may have been opportunities to simplify or make certain aspects modular and reusable.
Crude code is always where you start. You end up in a more elegant place later on.
Writing code is not like writing an essay. Developers don't sit down and write pages and pages of code. They wrestle with it and run it tons of times before their final result is coded to ensure things are working along the way. Several passes are taken on the same code. Eventually from experience, you take better routes from the outset.
From least understanding to highest understanding, this is how we've seen the programming learning process.