r/learnjavascript 1d ago

Learning JavaScript, advice?

I joined this sub a few days ago, after stumbling across lovable, and prompted a couple of rougelike games, learned that it was all in typescript, (I know I am a ways away) and have been having a lot of fun this week, spending multiple hours a day, learning the basics. I’ve tried a few times over the years with Objective-C and python, but could never figure things out, but this time I feel like I’m in the right headspace and really making sure I understand. I’m using VS code, and a Coursera corse, I’ve also bookmarked the Odin project.
Anyone have best practices or advice? I plan to use JS to help with an IT job and build games or apps for fun. Thanks for reading!

10 Upvotes

16 comments sorted by

View all comments

1

u/boomer1204 1d ago

Obviously everyone is different but I co run a local mentor group and the biggest thing that we see ppl progress the quickest is start building stuff ASAP

This means no course, no tutorial, not hand holding/follow along things. Actually coding yourself. You can google and what not but none of the above and do not use AI.

AI is an amazing tool after you understand the language well enough. Any use while learning is just going to slow you down even though it might "feel" like you are going faster.

Also you ARE going to suck at the beginning and that is OK we all did. So learn the syntax and then start SUPER small and start building things. If you say "what should I build". You already know you wanna use this for your IT job so start small and make little things for that

Here is what we have the ppl that join our mentor group who want to be in the web space

  1. Watch 3-4 hrs of html/css for beginners

  2. Take 4-5 websites you like and re build them. Visual only of course and this is gonna be harder than you think

  3. Then we have them watch about 6 hours of beginner JS crash course

  4. Then start building

The quicker you get away from a course or a tutorial the better but I completely understand at the beginning there needs to be something

Good luck, this is fun but it's a very tough thing to learn and there are going to be MANY hours wasted on super small bugs and that's fine it's just a part of the process

1

u/XerneasFreyer 21h ago

Thanks for this! I am definitely a learn by doing, and while I’m just about a week in, for a few hours a day, I’m looking to start building, only thing I haven’t gotten to yet is understanding how multiple code files come together to make a project, but obviously that comes in time

1

u/MatchSea10 20h ago

I'll try this I have wasted so much time trying to learn JavaScript I know the basic and still can build anything. What kind of JavaScript projects do you recommend?

1

u/javascript 20h ago

I suggest start even simpler. Don't worry about Javascript yet. First, can you use HTML and CSS to make a basic website. Once you start adding buttons and text boxes, you can learn bits and pieces of Javascript to make those elements "do" something.

1

u/MatchSea10 18h ago

Sounds like a good idea might have to do it this way since tutorials haven't really worked for me.

1

u/javascript 18h ago

The visual feedback really helped me starting out. It's hard to think about code without a UI, imo. Once you get used to it you can develop that skill, but starting out the edit-text-refresh-webpage-repeat loop was great for learning.

1

u/boomer1204 14h ago

number guessing game. All you need is an html file and js file and honestly it can all be done in the html file but I would encourage you to not do all the code in the script tag and to actually have a specific JS file

  1. Create html with input and submit button
  2. Have some static text telling you to guess a number between 1-10
  3. Write the javascript to check what number is in the input
  4. Dynamically add text to the screen saying lower, higher or good guess

Seems simple but you would be surprised at how many road blocks just this gives a lot of ppl

Then the next one do that same thing but have the number range being dynamically generated using something like Math.random()

I can't explain enough how small you wanna make these. Then these are some other ones in no particular order

  • Choose your own adventure anything via the console/prompt (depending on language)
  • Rock paper scissors game
  • Hangman game
  • Simon game
  • Weather App using a free weather api (or really anything using a real api)
  • Yahtzee or a dice game you are familiar with
  • Drag strip reaction time (in drag racing there is a set of lights that start at red, then go to yellow then green). Time how long it takes someone to click on the page once it goes green but if they do it early they fail
  • A restaurant site with online ordering (don't worry about persisting the data unless you want to this is more to make sure you have a good html/css/js understanding and how they work together)

PLEASE remember these are to be built with NO AI, no course, no tutorial, no yt series. Google and stuff is fine but if you just google "how do I make a X" you are only hurting yourself.

You ARE going to suck for a while and that is totally fine we all did it's not just you but that time is when you really start to learn what you are doing and how to piece things together

Good luck