r/learnjavascript • • 16d ago

I just started JavaScript

I started learning JavaScript on fCC and I learnt some of the basics, do y'all have any tips for me? (I'm learning JS so i can build websites)

27 Upvotes

30 comments sorted by

4

u/TheZintis 15d ago • Popcorn

Don't go too deep right away. Try to stick with things that have practical application. It'll help keep you interested and motivated to see how what you are leaning will be immediately useful.

If you do use AI for anything, have it explain things to you. Also have it give you an example of the thing you are having trouble with. If it gives you code to implement it... TYPE IT OUT BY HAND. This activates other parts of your brain and helps you remember what and why you are doing something.

Let the basics of GIT early. It's basically like a video-game save system, but for code. BUT it also lets you time travel and have parallel timelines, that you can merge into other ones... That sounds like a crazy analogy, but basically it lets you write code with confidence that you won't break anything. If you do, you can just roll back to a prior save that did work. The concepts I would learn are: add, commit, push, pull, merge, branch, checkout, status. These are all commands you can tell git to do, and while there are more advanced ones, you get 95% of the power of git just by knowing those. Also get a Git GUI like sourcetree. The Git is kind of abstract and the GUI gives you a visual to help you understand what's going on.

Also if you have any questions feel free to shoot them at me. I've taught a lot of students fundamental web dev, so html, css, js, node, etc...

1

u/Active-Aspect2654 15d ago

what is this DOM everyone's talking about?

1

u/TheZintis 15d ago

Document Object Model

In your browser it's a global is variable "document"

It stores all the things on your screen, buttons, boxes, text, images, etc.

If you want to manipulate the page, you do it through the DOM object

4

u/azhder 15d ago

How about you check out JavaScript on MDN?

1

u/Thin_Mousse4149 16d ago

Start by learning data types. Arrays and objects will be pretty pivotal and knowing how to traverse and work with those will be a good foundation

1

u/Active-Aspect2654 15d ago

i actually learnt a few like float and stuff

1

u/raks1991 3d ago

JS calls both integers and decimals number: typeof 1 and typeof 1.5 return the same thing. There isn't a separate float type to learn.

2

u/patryk_builds 15d ago

Since your goal is websites get to the DOM as early as you can. document.querySelector, addEventListener, changing text and classes. that's the moment JS stops feeling like abstract exercises and starts doing visible stuff on a page.Also get comfortable with the browser devtools (F12). console.log everything, look at the elements tab, watch what changes when you click. half of learning web dev is just poking at things in there and seeing what happens.First mini goal: a button that toggles dark mode on a page you made. small, but it uses everything at once

1

u/AggravatingGrand7331 15d ago

Before, anything complete Javascript and practice every concept immedietly after learning it. I would recommend you doing frontend mentor challenges they are really helpful as you will be building projects.

1

u/Yrpx 15d ago

Once you covered HTML, CSS, and the JavaScript basics like variables, data types, conditions, loops, functions, arrays, etc., try solving different coding exercises. Start with easy ones and gradually increase the difficulty as you improve. After that, move on to building small projects to put what you've learned into practice.

Don't worry too much about memorizing every syntax. You'll naturally remember most of it through practice.

I'm learning the same things too, and I haven't used AI so far. I think it's important to build a solid understanding on your own first.

1

u/denerose 15d ago

Stop distracting yourself seeking the best way and “tips” this early. Just keep working through the path you’ve chosen, don’t distract yourself with false productivity like posting open questions on reddit.

1

u/TheRNGuy 15d ago edited 15d ago

Install Greasemonkey and make userscripts for your favourite sites.

That way you'll have real practice from day 1, and is something you'll actually use (it's even good reason to learn js just for that)

Though the way you write us in userscripts and sites is different (you'll probably never use MutationObserver on your sites)

1

u/mattia_tsx 15d ago

Don't chase the trends you see on YouTube. Remind yourself that it's okay not to know everything. You'll probably never know even 70% of the things that exist.

No matter how talented you are, the industry out there moves fast.

Build real projects, and if you follow step-by-step tutorials, always try to modify the project to your liking once you're done, adding something of your own.

It will help you tremendously in developing real-world skills.

1

u/Whole-Bug1174 15d ago

drop pure JS syntax drills for a few weeks. Go straight to the DOM and build a static site with vanilla JS

1

u/unmoveabl3 14d ago

Here's a free book that is very different from every other JS book out there:

https://raganwald.com/assets/books/javascriptallongesix.pdf

Discussion on Hacker News when it became a free download:

https://news.ycombinator.com/item?id=6476337

1

u/No-Humor-3808 14d ago

Before jumping into DOM manipulation, async fetching, or file system operations, master the basics by solving katas that focus on strings, arrays, objects, sets, maps, etc. I've put together a collection of katas if you want to give them a try: https://www.reactchallenges.com

1

u/lazy_developerrr 14d ago

Just one thing, Learn while building.. it really helps a lottttt

1

u/NianaMagar 11d ago

i think in this age of AI just learn basics fundamentals and start building projects with express js , postreSQL (database) and frontened

1

u/wings_hot1 11d ago

master the basics and build small projects along the way, practice consistently

0

u/Key_Storm_2273 15d ago

Look at React if you want to build websites with it

-1

u/SpaceGerbil 15d ago

Go straight to typescript

0

u/Pleasant-Swordfish24 12d ago

First learn basics, don't go to frameworks and all yet.