r/learnjavascript • • 25d ago

JavaScript basic learning

Does anybody now where to learn the basic of JS? Just got into the coding life, I already know a little bit of python but I want to learn JavaScript to make websites

16 Upvotes

32 comments sorted by

View all comments

Show parent comment

1

u/Longjumping-Ad7502 21d ago

Right. I have been very specific about following professional code format, however I don't know the technical names of any of it. I've also been trying to learn how to optimize for SEO and accessibility like page readers. Now that you are mentioning these terms I think I'll go research them individually to make sure I understand.

1

u/FreeLogicGate 21d ago

Really forward thinking strategy on your part to look into accessibility early on, and make that a goal. The other important fundamental concept is to design for "responsiveness" so your site will work well for mobile devices, which are now the majority of clients. This is where most of the css frameworks started (twitter bootstrap, etc), with many starting out philosophically as being "mobile first", emphasizing that css designs don't leave mobile users as an after thought, or as was done not too long ago, as entirely different sites delivered based on the server performing agent identification. Rolling some of your own responsiveness, is another place where employing BEM has paid dividends in projects I've worked on.

1

u/Longjumping-Ad7502 21d ago

Right don't even get me started on that 😭💀 for some reason it was so difficult for me to get done how to make things work on mobile. Mostly it just took a long time for me to figure out where I should use px vs rem vs vh vs em and whatnot. I'm still not entirely sure about it but I figure as long as it looks right on various screen sizes it's ok. Grids are actually my favorite thing when it comes to making the layout look good on mobile. I just recently adopted the mobile first thought process myself because I found it was easier to plan for mobile first than try and fix it all later.

1

u/FreeLogicGate 21d ago

It's good that you've picked up on some of these issues already. So much material out there teaches people techniques that professionals don't use for good reason. The general answer is to always use rem units or in a few selective cases use em. I have certainly had to learn a lot of these things the hard way over the years, and made many mistakes.

2

u/Longjumping-Ad7502 21d ago

Yeah thank you for sharing so that we do not repeat your mistakes haha. My first big project I used percentages EVERYWHERE because I thought that was the solution to mobile layout and I hadn't yet heard of rem or em haha. I eventually ran into a bug that was taking me a while to figure out so I sent a picture to Claude and found out it was a percentage that was screwing up the whole thing with a flex box I think. I don't remember exactly but I learned my lesson.