javaScript is killing my dreams

i have a post topic going at the moment cuz i need help with one of the JavaScript challenges but man i am needing a major boost. i learn hands on. JavaScript is so vague and even doing the challenges isn’t really a hands on approach to learning because i am not actually doing anything… i’m not building anything. there is nothing to attach the concept to. i feel so discouraged like if i cant get this then my dreams are dust. the best plan i have is to bumble my way through the challenges and then try the projects and hopefully building the projects will offer the clarity i need to understand what the heck is going on. other than that i worry that my plan of getting a better career and pulling my family out of poverty is bust. they are so excited for me to learn this stuff and get a better job, they are so hopeful and excited. i cant let them down :sob:

Writing algorithms is inherently difficult, but yes, JavaScript isn’t the easiest language to work with for beginners. It might be worth your while to take a detour and take a basic computer science course that uses Python and focuses on algorithms and data structures. You could probably finish such a course at edX in one to three months.

1 Like

That feeling is familiar believe me…I combine different learning tools…I started with FreeCodeCamp, I also downloaded videos from youtube (JavacScript for biginners with projects) to help me understand things more. I also read up things online too but still I get stuck in the challenge here, thanks to the great people in this community (forum) who are ever ready to help you. When you combine these things, it can help you understand the challenges more and the projects here also help a lot for things to sink.

Don’t be too hard on yourself, just be consistent. Don’t be discouraged, always ask for help when you’re in need…

You will get better

1 Like

Don’t worry, I guess everybody went through this phase, I sure did. What helped me was using multiple sources to learn and also doing small projects. You need to slowly start building small stuff while learning. You can try this https://javascript30.com/ they are 30 different small projects built with vanilla JS. If you feel like you are stuck on one topic or concept (eg: the this keyword) just watch multiple videos about it. There are plenty of useful material for free on youtube that can help you. It took me almost 2 years of learning but last year I got my job as a software developer. I started not knowing many things about javascript and to this day i still learn new stuff everyday so don’t worry too much and just practice building stuff.

1 Like

thank u for your encouragement! i will check out those other sources!!! i have been using codecademy for some filler but i cant afford a subscription so i cant do any other the follow up projects with their course. and its good to know that everyone goes through this stage (its just not me being dumb lol just paying my dues i guess :smile:)

Everything JavaScript used to confuse me, now only JavaScript confuses me. :slight_smile: I can do simple things without looking at code examples because I practised doing them multiple times. That does not mean that what I do is good.

I think one issue with FCC JavaScript challenges is that you don’t always see the result of the code. I started adding console.log(whateverTheResultVarIs); to the end of challenges so I could see the output before submitting it. I also code them in Visual Studio Code or Atom so I can see proper error messages in the editor’s terminal (syntax errors) and browser console (execution errors).

Don’t just do the challenges if you feel stuck. Recreate the challenges by yourself in an editor.

When I think I need more practice with a concept, I create pages with examples, and instead of boring console logging, I send the output to the DOM so I can see something on a web page.
Here’s part of my code for constructors :

    // E X T E N D  C O N S T U C T O R  W I T H  A R G S
    function Fridge(type, shelves, energy) {
      this.type = type,
      this.shelves = shelves,
      this.energy = energy
    }

    let fridgeFreezer = new Fridge("Fridge Freezer", 10, "A");
    args.textContent = `This is a ${fridgeFreezer.type} with ${
    fridgeFreezer.shelves} shelves, and an energy rating of '${
    fridgeFreezer.energy}.'`;

    // P R O T O T Y P E S

    let proto = document.getElementById("prototype");
    function Computer(ram) {
      this.ram = ram;
    }

    Computer.prototype.disk = "M.2 SDD";
    let pc = new Computer("16GB");

    proto.textContent = `Your computer has ${pc.ram} of RAM and an ${pc.disk} Drive.`;

    // C O N S T R U C T O R  P R O P E R T Y
    let construct = document.getElementById("construct-prop");

    function Snakes(species, venomous) {
      (this.species = species), (this.venomous = venomous);
    }

    let cobra = new Snakes("Cobra", "venomous");

    function checkConstructor(snakeType) {
      if (/*snakeType.constructor === Snakes*/ snakeType instanceof Snakes) {
        // Instance of is a better way
        construct.textContent = `Yes, ${
          snakeType.species
          } belongs to Snakes.`;
      } else {
        construct.textContent = "No, this is not a snake.";
      }
    }

    checkConstructor(cobra);

I suppose I could try and extend the fridge and computer examples by trying to make a buy a new fridge or PC app or something like that.

2 Likes

I will never defend JS, it’s a bad language patched over the years to become more tolerable. But my impression is that JS isn’t the origin of your frustrations but most likely your inexperience with algorithmic thinking. You may want to practise solving these problems by hand or using flow charts, notebook dribbles or even an easier language such as Python.

But don’t just practise and never apply those concepts; the more you learn the more you need to put the things that you learned in practise with real projects even if they’re just small or simple.

There’s a book I recommend called: grokking algorithms; it’s very well explained and illustrated.

you may be on to something there with the algorithmic thinking, its a hard thing to adjust to, at the moment when people try to give a hint or explanation it to me is just

" oh its simple, they want you to find the MATH MATH MATH and then you need to MATH GARBLE GARBLEDY MATH MATH, and then you have your answer!"

and i’m like ooooook so uh how do i… MATH?:woman_shrugging:

i will try to find that book you mentioned lol.

I personally hate math, and programming is backed by math, but the math that really matters in Computer Science is different than most people expect.

There’s the math used in programming that is more like “domain” knowledge, or based upon the use-case. You will probably need to know more math if your building a game engine (physics), than the sort of math you would use building an e-shop. You might run into math when doing coding challenges, as they are easy to boil down, test your algorithm skills, and are easy to test against, but this sort of math (ahem Fibonacci numbers) is just the topic, not the goal. Day to day you don’t need to ever need to know how to generate a Fibonacci sequence, but the steps in solving that problem are what you probably would use day to day. (data structures, algorithms, loops, etc)

Then there is also what I’d call “programming” math. Stuff like algorithms, data structures, boolean math, finite atomata, and discrete math. They all might sound crazy complex, and have funky formula syntax, but the idea behind all of them is what underlies most of the practical code you write.

Finally there is the language syntax itself. JavaScript is not the cleanest, prettiest, or more straight forward language out there. It has a ton of quirks, features built on features, multiple ways to do the same thing, and yet tiny differences between those approaches. The language is easy to learn simply because there are tons upon tons of resources on it, but that doesn’t make up for the fact the language is has been more or less duck taped together over time.

If your struggling with understanding how a loop works, then your learning core concepts to programming in general, and maybe the syntax of the language on getting a the loop working how you want. If your struggling with understanding how to build a stack then your mainly learning data structures. If your struggling with knowing the difference between arrow functions and function in JavaScript then your learning how the language itself works.

Learning each of these areas is not easy, its actually very hard as it takes time, grit and a lot of practice. No one learns these concepts by reading something once, memorizing the syntax, and instantly understanding everything about it. Unlike HTML and CSS, programming requires though beyond just memorizing syntax and it is because of this learning JS is magnitudes harder and requires more work and time than the first two.

I’d compare it to knowing words and knowing poetry. You could memorize an entire dictionary (knowing the syntax), and yet can’t write a decent poem.


If your goal is to go far, you need to double down on doing 1 thing: Understanding. Its more important to know why then how. Knowing why your code works is more important than getting it working. Knowing why your code doesn’t work is more important than fixing it. Knowing why someone else’s code works is more important. Obviously once you know the why, its much easier to go about fixing things and making things work. Usually its very easy to just guess, or give up when things aren’t working, but neither teach you anything you can build upon.

If your struggling with JS at this point, I’d back up and go back a few challenges until you get a firmer grasp of the concepts you are learning. Keep going back to the basics, until they are fundamental and non-trivial. I’d also refer to external sources to expand your horizons so you know what’s out there. Resources like MDN are great to just dive into the subject without any real goal beyond expanding your horizons.

If you want to expand your theoretical horizons (like learning that programming math I mentioned above) going over sites like https://teachyourselfcs.com is great places to start. Again, it isn’t so much memorizing what topics are out there and knowing everything, its just getting familiar with them so you can dive into them deeper later.

I believe anyone can learn programming, it just requires 3 things:

  1. Time
  2. Grit
  3. Internet connection

You need time to learn what you can, you need grit to stick with it when you are stuck, and with an internet connection you can find resources and help at anytime for anything. The first 2 are what’s important, you might need more time, or more grit to do what you want to do, but with the three you cean learn anything!

Good luck!

1 Like

I think the root of the issue isn’t so much the roadblocks you’re hitting with Javascript or in programming in general. What I am seeing from this post and several other posts from you is too much focus on the ends when effort needs to be placed on the means of getting there.

What I mean by that is that you’re trying to figure out how you can become a software developer, being paid a relatively high salary your first year, in the shortest amount of time. There’s no denying the reality of being a developer, the income potential is very high and very lucrative. However, this can create a lot of issues with the drive to learn this stuff. Programming is a very hard thing to learn. It takes a lot of headaches to suffer through, and even some tears when you encounter challenges.

Not only that, employers are not looking for developers. They’re looking for good developers. So the competition in the beginning is going to be thick.

My best suggestion is consider questioning the mentality behind your motivation in getting into this line of business. It takes a curious mind that is willing to ask questions on how and why things work the way they do. That means shifting your learning strategy from what you used in previous academic pursuits and adopting the problem/solution approach. This means only learning what you need and having the desire to fiddle with it in code sandbox like CodePen, Repl.it, or CodeSandbox.

How much time are you willing to sacrifice to get into a position where you’re doing something you enjoy and can atleast get you at a break even point?

1 Like

Gah, this kills me. Javascript is awesome. #Javascript30 is so so fun and so informative, but it may be frustrating for a beginner. To just get back some of that JS mojo, try this:

Pop open a website, any website. Inspect an element with a class. Copy it, in your console get the element by class name: var element = document.getElementsByClassName('<the class you copied>')[0]. Then element.classList = []. That element probably changed.

Javascript was designed to run in the browser, and it’s a tool for manipulating the DOM (document-object-model, the stuff that builds what you see on the web). We’ve made it do lots of weird other things, but manipulating the DOM is the place to start. Everything above is pure Javascript, and there’s tons of this sort of thing you can do to see your changes. If you thought it was fun to see code you wrote change a website, try You don’t need jQuery, which will show you lots of DOM-manipulating tricks that you can run on any website.

Good luck!

1 Like

Give it a try with codewars. Maybe you find it helpful. :slightly_smiling_face: