I am struggling with JavaScript

I feel like I need a real person to explain this to me. I am just about passing the challenges but it’s trial and error,and I don’t fully understand it or know why I would use each thing in real life. It’s increasingly difficult for me to continue learning as I am spending alot of hours without achieving anything.

Can anyone recommend where I can go to learn the basics in real life? Preferably a one day workshop in London.

I am on “Global vs Local Scope in Functions” currently and just have no clue what is going on

1 Like

This thread may help.

2 Likes

Have you tried looking at some videos? These may help. There have been a few posts here of people offering to help 1-on-1.

Do be patient with yourself. You won’t understand the why of most of these topics until you start building the JavaScript projects.

You are definitely not alone @LinaSMilns, JavaScript scope is not intuitive and does not behave as it does in other languages. It is a bit outdated (ES5 only so it does not cover the let keyword for instance) but this book does an excellent coverage of all the details with scope in JavaScript

http://bdcampbell.net/javascript/book/javascript_the_good_parts.pdf

Trial and error are a big part of learning to code. To be honest, they’re a big part of coding professionally too. The important thing is that you’re learning from the errors and not just flailing madly. Try, fail, learn, try again, fail better.
When your code isn’t correct, take the time to (try to) figure out why it doesn’t match you expectations. How does making a change affect the outcome? How can that lead you closer to the solution?

And then, when you have a passing solution, tinker with it. You (in theory) know what is going on with your code, so this time when you make a change you should be able to predict how it will affect the outcome. Sometimes you’ll discover that you didn’t fully understand and now you have to tinker more until you get it. Learning to code is an empirical process; don’t be afraid to get your hands dirty.


_Semi-related anecdot_e: My partner is a university math instructor and their favorite students are Computer Science majors because when they come in for help they say “I messed around with it and here are all the things I tried. I can’t figure out the solution, but I know where it’s all going to hell.” His math and engineering majors just say “I didn’t understand, so I don’t know what to do.”

3 Likes

Lina, don’t worry. Coding is HARD. That’s why software engineers get paid so much!

The important thing is to just keep fighting through the exercises. The more time you can sink in in a block, the better off you’ll be. If you just do ten minutes a day, your frustrations are likely to continue. If you sink in two hours a day, you’ll start to see the patterns.

The next big leap is in solving the algorithm challenges. Those are no joke, but they’ll help you understand how JavaScript can be used to solve problems.

There’s an even bigger leap to make once you start building the projects, because then you WILL be using JavaScript to solve problems.

Just remember its okay to struggle. The key personality trait of a successful coder isn’t some kind of magical genius, it’s tenacity, and the willingness to hit your head against a problem for hours in order to get the brief “EUREKA!” moment when you actually make something work.

2 Likes

Kyle Simpson’s library of books have been helpful for developers of various skill-levels including us newbs. You can purchase them all or read them online for free.

The explanation and walk-through of scope in his 1st book “Up & Going” helped me out a lot.
His 2nd book is all about scope: “Scope & Closures”.

You Don’t Know JS (YDKJS)

5 Likes

Thank you for the encouraging words everyone. I am returning to codecademy to see how that treats me for now. I’m ready to work hard for this. Bring it on!

2 Likes

Yep, CodeAcademy is a great resource. I use it for learning syntax and then come back to FCC when I’m ready to work on meatier projects. Like others have said, you’re not alone and the key is to never give up. This stuff is really hard. Developers make really good money for a reason. Keep it up!

watchandcode.com is the best tutorial I found for javascript.

1 Like

FCC’s approach is spartan indeed, but that is not necessarily a bad thing. Allow me to explain why.

For me, the challenges were child’s play, but that’s because I’m an experienced programmer, using FCC to get my web development skills up to speed. But how did I become a programmer in the first place. I have a university education that gave me some knowledge, but that only got me so far. For me to learn to program, I had to have the aptitude to do it in the first place. Furthermore, I had to have the resourcefulness to learn from other sources how to extend what I’ve learned, Everything I have used as a professional is something I learned long after my graduation.

So, in short, if you are going to become a coder, you need to have it in you to be able to do that kind of work and you need to know how to expand one’s knowledge. So, to my mind, your approach to FCC is sound.

1 Like

@LinaSMilns,Hi Lina, whatever problem or error you face you are always welcome to email me on shanto_s19@yahoo.com , illl be glad to help, i have started about year ago and went throw all these difficulties and hard feelings until i found my way to the fun :slight_smile:
don`t even hesitate, anytime.i can assist you online too.