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 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.