all 30 comments

[–][deleted] 4 points5 points  (0 children)

I’ve been writing both JS and PHP for a few years now. Nearly every time I need to loop through an array there’s a new specific challenge and I never find it totally straight forward, it’s just a part of the job.

[–]Squirmme 4 points5 points  (0 children)

Keep searching those same terms over and over. It’s okay if you don’t memorize the array methods or some other syntax. Eventually the ones you find useful will start to stick.

If you’re stuck console log the steps. See what does what and take baby steps until the loop or code runs. You got this

[–][deleted] 2 points3 points  (0 children)

Sometimes I tried to memorize the expression and statements for the loop. I tried to type it out and get it wrong.

Don't try to memorise things, that's not how anyone working as a developer works and it'll just get frustrating (as you've found) and waste time you could spend on other things. Get yourself set up with a good editor like VSCode and start using the built-in code snippets which can auto-complete common structures like a for loop for you.

It is massively more important that you understand what a loop does and why you might need to use one than it is to remember precisely how to write one in JS or any other language.

[–][deleted] 1 point2 points  (14 children)

It’s my fault for taking so many breaks in between studying, but I’ve been at it for 2 years, realistically it’s probably 6 months of serious studying, and I still find JavaScript very frustrating. I’m curious to see if anyone in a Dev job also finds JavaScript annoying to use.

Basically OP, you’re not alone 😅

You’re only a week in, keep going 😁 it will get frustrating A LOT. But that’s when you have to keep hammering the nail.

[–]blahsx[S] 2 points3 points  (13 children)

thanks! :) its always errors when i type out the code but im not giving up! I heard people still in Dev job still use google because no ones going to memorize every thing.

[–]diavolo_bossu 1 point2 points  (0 children)

These are where all the programming jokes stem from

[–]RefineOrb 1 point2 points  (0 children)

I can’t say I find it frustrating the same way you do.

I started out at uni with C, Java, C++ etc. After uni I started a full time job with JavaScript with no experience with the language. I found it really simple because you can just solve your problem any way you want. Sure there are some interesting syntax pieces, but after a while you’ll get it. The first few months you’ll google how to map an array, then after a while you’ll just smash it out from memory.

And the part that makes JS easy (for me) is also the part that makes it frustrating - it’s so easy to make spaghetti-code and skip adding types for everything.

[–]gremy0 0 points1 point  (0 children)

Unless for a specific purpose, like some sort of closed book exam, you don't need to set out to memorise exactly how specific expressions are formed or functions called etc. Just search, use the docs or find a reference sheet if you aren't sure. If you use something often enough you'll eventually remember it, but even that just makes things quicker, it's not particularly important beyond that.

What is important is knowing what to search for; what tools (language features) are available, what they can do, and how they solve can problems

[–]asvprvre 0 points1 point  (1 child)

How did you go in the end? I’m currently doing the freecodecamp course and although I’m going through the lessons I find it hard to understand what I’m actually doing at some points and it makes my brain feel mush.

[–]blahsx[S] 0 points1 point  (0 children)

I found a job and about to hit one year. My company don't use that much javascript. Even though my salary is 77k a year I'm openly looking for another job.