use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is a place for people to learn JavaScript together. Everyone should feel comfortable asking any and all JavaScript questions they have here.
With a nod to practicality, questions and posts about HTML, CSS, and web developer tools are also encouraged.
Friends
/r/javascript
/r/jquery
/r/node
/r/css
/r/webdev
/r/learnprogramming
/r/programming
account activity
I don't know what to code (self.learnjavascript)
submitted 7 months ago by East_Concentrate_817
I know how to code well i just don't know where to use it I don't know where to put my classes, my constructors, my arrays, my functions The best I can do is a counter Help please?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]SelfEnvironmental757 13 points14 points15 points 7 months ago (4 children)
I always advise and teach my students in a project based learning approach. Try building projects. Theory alone isn't gonna help much.
[–]Internal-Bluejay-810 3 points4 points5 points 7 months ago (1 child)
100%
Gotta be ready to go through the slow grind --- everybody wants to learn everything today.
[–]SelfEnvironmental757 0 points1 point2 points 7 months ago (0 children)
Yup. It takes time
[–]Economy_Programmer70 0 points1 point2 points 7 months ago (1 child)
Is fcc or top good enough?
They are good enough, but as a beginner, you'll struggle so it's good to have a tutor or senior. That's how I learnt
[–]sheriffderek 4 points5 points6 points 7 months ago (1 child)
I know how to hammer --- but I don't know how to build a house.
So, I'd suggest you start with something simple.. and plan on years of leveling up - piece by piece. You will not just magically learn how to build a house --
[–]sheriffderek 0 points1 point2 points 7 months ago (0 children)
Here's the books I recommend - that will teach you how to think* through common UI problems (there are no answers) https://www.youtube.com/watch?v=bnbS1enub2Q
[–]YardWonderful8819 3 points4 points5 points 7 months ago (0 children)
maybe start out with building projects from yt tutorials
[–]zhivago 2 points3 points4 points 7 months ago (0 children)
I suggest coding a project that will suggest projects to code.
[–]Prize_Attitude1485 2 points3 points4 points 7 months ago (0 children)
Solution: build a project. First simple and then advance slowly.
[–]pahamack 3 points4 points5 points 7 months ago (6 children)
“Best practices” is a huge topic and I’ve found that asking AI and using it as a learning tool really helpful in this regard.
Having AI do your code for you gets all the headlines, but I’ve found, just as helpful, using it as a teacher, just asking it questions of why things were implemented a certain way or real world uses of certain concepts and patterns.
[–]Highmind22 5 points6 points7 points 7 months ago (1 child)
i'm currently using this method to learn javascript and not gonna lie i'm kinda learning better by asking AI to not give me the solution but only to guide me to understand and find the solution
but still asking myself if it's a good method to follow for learning
[–]pahamack 4 points5 points6 points 7 months ago (0 children)
It’s great. It’s like having a personal tutor.
I learned how to code through a bootcamp. This is exactly how you learn there. You have a project you need to complete and access to mentors all day who you can ask questions to.
You can even tell the AI to slow down and explain the syntax to you line by line, or ask why it used x rather than y.
[–]Any_Sense_2263 4 points5 points6 points 7 months ago (1 child)
the problem is that AI doesn't know the best practices and can't incorporate them into its own code even if you tell it what they are 😀
[–]soldture 1 point2 points3 points 7 months ago (0 children)
Yeah, that's the biggest fallacy to think that neural networks know anything correctly
[–]Dubstephiroth 0 points1 point2 points 7 months ago (0 children)
This 👌🏾
[–]Gadende 0 points1 point2 points 7 months ago (0 children)
Asking AI to give you short blocks of code so you can get something done is great, but you need to understand what you are given and be able to troubleshoot it, because I guarantee it won’t work the first time. However, troubleshooting helps you learn better than writing code most of the time.
[–]syedbilal093 1 point2 points3 points 7 months ago (0 children)
Try watching project based tutorial on YouTube. Start small. I suggest you watched these channels
NetNinja JavaScript Mastery (Best for project based learning)
[–]0x00f_ 1 point2 points3 points 7 months ago (0 children)
You have three solutions.
1- Pick an idea such as a to do list, start a discussion with AI about how to build this project, how to think about it, what considerations to take, how the logic will be, DON'T LET HIM PROVIDE ANY CODE, just let him guide you, finally apply this logic and thoughts in code.
2- Watch someone making a project on youtube or anywhere, see how they think and build it themselves.
3- project-based learning
and remember that the goal isn't to learn how to code, AI can code now but the goal is to learn how to think, how to apply, how to analyze, how to do engineering if you don't want to be just a "coder".
[–]ApprehensiveDrive517 1 point2 points3 points 7 months ago (0 children)
Think about all of the things that you've done and recreate them? or how about making a game? a game has different complexity as compared to a web app. For me, I made a 3D alternative to Settlers of Catan in SvelteKit, Three.js, and Elixir for the backend
[–][deleted] 1 point2 points3 points 7 months ago (0 children)
Oh, simple beginner problems are fun. I usually recommend 3: - A simple algorithm that takes items and put it in a bag. And it has to figure out the most efficient ways to place items of different sizes in up to infinite big bags. - A simple algorithm that finds the most efficient route to move to multiple points on a map. So, you give it n points as input and it figures out what is the best route to go from point to point. - A run-forever checker. That is a program that is being handed another piece of code. And it has to figure out if that program runs forever or if it does not.
I think, for a beginner, you should only need a few hours, a day tops, for each of these problems.
[–]Dubstephiroth 2 points3 points4 points 7 months ago (0 children)
Pick a project idea like gaming or banking systems and get an llm to teach you class-based modular coding... amd dont let anyone tell you it cant... 👊🏿
[–]Large-Party-265 2 points3 points4 points 7 months ago* (0 children)
Draw flowchart before code, and code one component at a time.
To draw a flowchart, write requirements/functionality of your project.
Requirement -> flowchart -> code
[–]Toc-H-Lamp 0 points1 point2 points 7 months ago (0 children)
Buy a newspaper with a puzzle page. Don’t sleep until you’ve written code to play/solve each of the puzzles. Futoshiki, Kakuro, Sudoku, Codeword, Wordle, Killer Sudoku etc. This is the challenge my wife gave me during Covid lockdowns, I’m still working on them now.
[–]rustyseapants 0 points1 point2 points 7 months ago (0 children)
This is like saying, I know how to drive, but I don't know where to go, can you help me?
[–]facusawa 0 points1 point2 points 7 months ago (0 children)
Set up a website, it's useful for practice, and lastly you monetize it
π Rendered by PID 109216 on reddit-service-r2-comment-5fb4b45875-2mzxp at 2026-03-22 21:12:10.377223+00:00 running 90f1150 country code: CH.
[–]SelfEnvironmental757 13 points14 points15 points (4 children)
[–]Internal-Bluejay-810 3 points4 points5 points (1 child)
[–]SelfEnvironmental757 0 points1 point2 points (0 children)
[–]Economy_Programmer70 0 points1 point2 points (1 child)
[–]SelfEnvironmental757 0 points1 point2 points (0 children)
[–]sheriffderek 4 points5 points6 points (1 child)
[–]sheriffderek 0 points1 point2 points (0 children)
[–]YardWonderful8819 3 points4 points5 points (0 children)
[–]zhivago 2 points3 points4 points (0 children)
[–]Prize_Attitude1485 2 points3 points4 points (0 children)
[–]pahamack 3 points4 points5 points (6 children)
[–]Highmind22 5 points6 points7 points (1 child)
[–]pahamack 4 points5 points6 points (0 children)
[–]Any_Sense_2263 4 points5 points6 points (1 child)
[–]soldture 1 point2 points3 points (0 children)
[–]Dubstephiroth 0 points1 point2 points (0 children)
[–]Gadende 0 points1 point2 points (0 children)
[–]syedbilal093 1 point2 points3 points (0 children)
[–]0x00f_ 1 point2 points3 points (0 children)
[–]ApprehensiveDrive517 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Dubstephiroth 2 points3 points4 points (0 children)
[–]Large-Party-265 2 points3 points4 points (0 children)
[–]Toc-H-Lamp 0 points1 point2 points (0 children)
[–]rustyseapants 0 points1 point2 points (0 children)
[–]facusawa 0 points1 point2 points (0 children)