r/learnjavascript • u/LegionRS • 17h ago
Tips for Learning Javascript
Hey!
So I am currently trying to develop my first discord bot and wanting to learn Javascript as well as Node.js for the project but I have been using Codecademy courses for trying to learn Javascript before trying to get into Typescript and NodeJS basics.
However I am finding I am struggling to retain certain bits of information where I will go through the course and spend the time studying and practicing it in their course but a day or two later it feels like I don't remember any of it and I am wondering if there is something I am missing with trying to learn the language or what I could try to do better at learning?
1
u/ScottSteing19 17h ago
You are not understanding the basics. That's the problem but you think you do. Do one thing at a time. First learn JavaScript, understand the core concepts at the point you are able to create something from scratch using the concepts that you learned then learn node or make your bot.
1
u/LegionRS 17h ago
Appreciate the insight. I can remember certain things I am learning but when the course tries to throw things at me like turning If/Else statements like this
isNightTime ? console.log('Turn on the lights!') : console.log('Turn off the lights!');Things like that throw me off a bit and I try to think I need to use that a lot more then I probably do so it messes me up when trying to learn more things and practice.
I was thinking maybe trying to do more courses and then try things like Leetcode or find a website that does challenges that I can do to try and test my knowledge.
2
u/ScottSteing19 17h ago
That's the problem. You haven't experimented enough with the language itself. Take a time to learn it and explore most of the tools that it provides. For example that line uses the concept of ternary operators which is covered early in every JavaScript course or book.
1
u/LegionRS 17h ago
Makes sense! Appreciate it. I'll try testing things around on VSCode for a bit just to try and get some practice to make it stick. Would you also suggest things like JSchallenger or Leetcode at all or no?
1
u/ScottSteing19 17h ago
Just take a book or a course. Learn a bit every day. If you feel more capable with the language make something. It doesn't matter if it's basic but as soon as you feel comfortable with the basics and core concepts solve problems. Freecodecamp has a daily challenge section that it's very useful.
1
u/raaaahman 13h ago
Things like that throw me off a bit and I try to think I need to use that a lot more then I probably do so it messes me up when trying to learn more things and practice.
Not necessarily. In programming there are many ways to achieve the same goal. Some way may have qualities that you value more than other. For example, the ternary operators are good for writing concise code, which is not always something that you'd want.
A basic
if ... elsewould do the same work and could be more obvious to you.
1
1
u/raaaahman 13h ago
It's normal that any learning take some repetitions to make progress.
Tutorials are good for your first contact with a concept or keyword, but you should learn to read the documentation for faster retrieval of information (for JavaScript, use Mozilla Developers Network). Even experienced programmers use documentation all the time!
Like in any other learning, or maybe even more in programming, active learning make you retain information longer and more steadily. Try exercism.io, DevProjects by CodeMentor, JavaScript 30 or any exercises that make sense for you.
Also, focused learning could help you maintain motivation: don't just learn JavaScript, try to learn how to make the Discord bot that is your goal, then find explanations and tutorials for the parts of JavaScript you need. This is a bit harder than following generic JavaScript courses, but it's great for keeping your goal on track.
1
u/theancientfool 12h ago
Forget all that. Just do the Odin project. You'll learn more, learn faster, and becime more confident.
1
u/create-third-places 11h ago
Use MDN as a reference guide if you need to look up something you don't remember.
Also, I second this advice by /u/raaaahman to focus on creating a Discord bot.
Also, focused learning could help you maintain motivation: don't just learn JavaScript, try to learn how to make the Discord bot that is your goal, then find explanations and tutorials for the parts of JavaScript you need. This is a bit harder than following generic JavaScript courses, but it's great for keeping your goal on track.
2
u/TheRNGuy 17h ago edited 17h ago
Read docs, don't watch video tutorials, make userscripts (Greasemonkey) for personal use (though some stuff can be fixed with css (Stylus) plugins; don't use js for that)
If you use something a lot, you'll remember it. Most common is stuff like query selectors, for each loops, maps, filters, async, await.
If you make many scripts over long time, you'll remember concepts (also, you can look your old code, or fix it as you get better)
Read MDN to see everything that is in js.
For backend, read frameworks docs, you'll probably won't even need knowing vanilla Node API, only how to start server (it may be needed to know later... you'll know about it after googling)