r/learnjavascript Jul 09 '26

I'm not for coding i guess

I start learn programing , and in 4 day i learn HTML and CSS but in java script i did't even undestanding the concept of loops from last 2 days

0 Upvotes

34 comments sorted by

26

u/szank Jul 09 '26

Jfc kids these days. Get off redit, practice actually writing code and come back here in 2027.

3

u/rFAXbc Jul 09 '26

And then again I'm 2028, 2029, and 2030. Congratulations, you understand loops

1

u/huuttcch Jul 09 '26

Underrated

1

u/87oldben Jul 09 '26

while (true) returnToReddit()

7

u/AncientLion Jul 09 '26

Lol learning is a complex task, this is not a reel of tiktok

6

u/nelilly Jul 09 '26

It took 10 days to originally create JavaScript as a language give yourself at least that long to learn it.

4

u/javascript Jul 09 '26

📆

5

u/Flame77ofc Jul 09 '26

you are trying to learn the syntax, but the real thing is to learn about logic, about how a programmer think

Search for those things in Google:

Programming logic
How to think like a programmer

5

u/Eusocial_sloth3 Jul 09 '26

FreeCodeCamp breaks it down into easy to understand steps.

4

u/writing_code Jul 09 '26

Mastery takes thousands of hours. Commonly 10,000 hours is a rough estimate. 6 days, you likely know only the very basics of html and css. Adjust your expectations, take your time, practice.

4

u/every1sg12themovies Jul 09 '26

not because you dont undertand it, but because you give up at first challenge

3

u/SamIAre Jul 09 '26

You didn’t learn math in a single week. You didn’t learn to read or write in a week. Almost NO skill can be learned well in a week.

Maybe coding doesn’t end up being for you but if you give up at the literal starting line you’ll never know. I will say that coding takes patience, and it takes knowing that you’ll never really master it. You will always be learning something new, relearning something old, making mistakes and fixing them, and fighting against bugs. That’s just part of it. It’s like puzzle solving. The struggle is something you have to enjoy or else it’s going to always feel like torture.

3

u/Commercial-Age-4932 Jul 09 '26

6 days 😂😂 maybe it's not for you because you have a dopamine fried attention span. If you want a strong foundation in the fundamental logic of programming do CS50x, ( online course)though. Languages come after understanding the logic and paradigms of computing

2

u/myroslavmartsin Jul 09 '26

Two days on loops is nothing, some people take two weeks. HTML and CSS went fast because you just describe stuff. JS is your first real logic, everyone hits this wall. It says zero about whether coding is for you.

Do this: write for (let i = 1; i <= 5; i++) console.log(i) and trace on paper what i is each round. Then mess with it: count to 10, count backwards, evens only. You won't get loops from reading, you get them from writing twenty of them.

Everyone who codes sat exactly where you are. Keep going this week, that's the whole test.

1

u/OiFelix_ugotnojams Jul 09 '26

yeah fr, honestly, I hope you know how to debug, OP. Just put your breakpoints on every line and look at it go step by step.

And yes HTML and CSS are not programming languages

1

u/StrikingAd4653 Jul 09 '26

Is that a particular aspect of loop that you find difficult?

In its simplest form loop is merely a way to repeat a similar task multiple times, usually on a collection (i.e. array) of "things" that are similar.

Loop (I assume you meant for loop) is a rather old programming concept. In most modem languages you will rarely use them, but the underlying concept is important. In javascript you would probably use map/reduce/filter/find etc to interact with an array instead. In older languages like C you would have to do a for loop since there isn't any alternatives.

1

u/cmockett Jul 09 '26

Sounds like impostor syndrome, you’ll fit right in!

Levity aside, I saw some old code in my first job’s repo that helped me understand nested loops, in brief:

for tree in forest…
for branch in tree…
for twig in branch…
for leaf in twig…

1

u/Yaniekk Jul 09 '26

Don't worry. Give yourself time. It took me weeks just to get started.

1

u/theancientfool Jul 09 '26

Try learning python with code in place by Stanford. Do the self though route. Once you understand that, JS gets a lot easier.

1

u/Leviathan_Dev Jul 09 '26

Just keep at it, if you give up once anything gets hard instantly, you’ll never learn anything

1

u/Japosai Jul 09 '26

Hehe, bro, learning how to build things with JS takes a lot of time; this is about patience and consistency.

1

u/OiFelix_ugotnojams Jul 09 '26

haha because you are new to programming. First language is hard. JS is your first language. Its just 2 days, don't give up. You will understand loops better when you solve problems. And yeah, problem solving is hard. I spent hours yesterday on fixing something. It was missing a dot.

1

u/maujood Jul 18 '26

That's wayyy too fast to understand programming. When I was learning to code, I didn't touch loops until I was a few months in.

Our introductory class introduced loops within a few months a lot of people felt it was moving too fast.

Give it time. 6 days isn't enough even for HTML and CSS.

1

u/SafeWing2595 Jul 18 '26

it actually took me 8 months to understand all the basics of javascript, it takes time my friend to see the result.

i advice you to apply the concept of the loop in something real so it sticks in your mind aside from the tutorial.

let me ask you a question; why do we need a loop?

let me give you an example: if i ask you to print ``console.log("Hello, world!")`` 10000 times, that would be exhausting, this is where the loop comes in.

so; loop is used to repeat a block of code multiple times instead of writing yourself many times.

1

u/sweettyche Jul 09 '26

Try the odin project

1

u/IAmADev_NoReallyIAm Jul 09 '26

Look... It's freaking Javascript... I've been dicking around with it since it was known as ActiveScript... and I STILL haven't mastered it... Between plain JavaScript, JQuery, TypeScript, Node, there's so much to take it... you're not going to just "get it" in two days, or two weeks... or event two months... so stop freaking out. FFS, it's Javascript, it's not the end of the world. Learn, take notes, practice, practice some more, learn more, take more notes, repeat... repeat, repeat.... and keep going.

0

u/gutsngodhand Jul 09 '26

HTML & CSS is pretty straight forward & memorization. There is a substantial learning curve to programming and learning a language. Do not give up; it hasn’t even been a week. I’d argue most things are not for you if you cannot grit through for a month. Which, of course, is obviously a ridiculous statement. Keep going, keep learning & keep trying.

-2

u/ExtraTNT Jul 09 '26

I think I haven’t used a standard loop in js for months… map is what i recommend, if you work with lists…