4 Mistakes That Are Getting You Stuck Learning JavaScript
Tags: javascript, beginners, webdev
Published: 2019-09-24 15:42:01

---
title: 4 Mistakes That Are Getting You Stuck Learning JavaScript
published: true
tags: javascript, beginners, webdev
canonical_url: https://carlanderson.xyz/4-javascript-mistakes-that-are-getting-you-stuck/
cover_image: https://images.unsplash.com/photo-1469607462020-dea989d8daee?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ
---

When learning to code, you expect to struggle. There's a lot to learn, and it won't all come easily. All you need to do is put your head down, work hard, and chip away at the difficult places bit by bit.

But what if you've been "chipping away" for weeks with no results? Every time you try to grind through the next chapter or [work out how to write that first line of code](https://dev.to/canderson93/how-to-write-javascript-when-you-don-t-know-where-to-begin-5f3f), you get nowhere! _You don't get it._

You're stuck - and you have no idea what to do.

Did you miss something important? Do you need to start over, and pay more attention to the basics? What are you doing wrong?

The good news is that you're not the first person to ever get stuck. I'm going to cover four common mistakes and provide advice on how to get past your sticking point.

## #1: You're not writing code

Not writing code is the _number one_ mistake beginners make - and it's by far the most damaging in this list. JavaScript is a tool, so the best way to learn it is to use it - You can't learn to swing a hammer by looking at nails.

[I've covered it before in this article](https://dev.to/canderson93/can-you-actually-learn-javascript-from-an-online-course-5eag) - solving problems with code is different from knowing the language. You're going to have to learn this skill eventually, and the sooner you start, the better.

Courses will often include some programming exercises, but these aren't enough. You should aim to make your own programming decisions, instead of finding a predetermined solution. With that said, exercises are better than nothing.

[You can check out this article if you want help thinking up project ideas.](https://dev.to/canderson93/how-to-find-ideas-for-good-practice-projects-5hcm)

## #2: You're trying to complete topics before moving on

Learning paths in JavaScript are presented linearly. You have to learn all about variables before you learn all about arrays. You need to learn vanilla JavaScript before you learn React/Angular/Vue.

_This linearity isn't what learning JavaScript is really like_. We only teach it that way because we have to introduce you to concepts one at a time. It needs to be done in some order.

Learning JavaScript is not linear. Concepts flow into each other, and later material provides insight into earlier thoughts. Trying to "finish" arrays [or vanilla JavaScript before moving on is a waste of time](https://dev.to/canderson93/when-to-start-learning-a-front-end-framework-9hk).

Instead, you should gain a shallow knowledge of a breadth of topics, and look it up again when you need more depth:

1. You should know what each concept is
2. You should vaguely understand when/how to use it (so you know when to look it up again)

That's it. When you're writing code (see #1), that's your chance to revisit these concepts and understand it more.

If you're stuck with a particular concept, move on and come back to it when you need it. There's a good chance that more advanced ideas will provide the insight you need.

## #3: You're starting over again

This is the mistake with the highest casualty count for would-be JavaScript developers. In the biz call, we call this "Tutorial Hell".

When you're completely stuck on a concept, it's tempting to find a new resource and start over. Maybe this one will teach you in a way you understand?

_Don't do this._

JavaScript's core principles are concrete, so beginner resources are relatively interchangeable. A variable is a variable, and that doesn't change. It's unlikely that you're going to get much value by scrapping what you've done, and trying again.

What you should do instead is practise writing code with what you already know (#1). Rather than spending more time with a concept, move on and go back when you need (as in #2).

## #4: You're focussing on JavaScript too much

This may seem silly, but your end goal isn't to learn JavaScript. You're learning to program; JavaScript is a means to an end - and you don't even need that much.

A large part of JavaScript consists of what we call syntactic sugar. These are features that make JavaScript more pleasant to use but don't add any new functionality.

Once you account for this syntactic sugar, you only need about 20% of JavaScript.

If you spend too much time learning JavaScript, you'll eventually be re-learning things you already know. Your time is much better spent studying general programming concepts.

Here are some concepts to get you started:

- [Boolean algebra (truth tables)](https://www.cs.utah.edu/~germain/PPS/Topics/truth_tables_and_logic.html)
- [Graph/Set Theory](https://web.stanford.edu/class/cs103x/). See [this article too](https://medium.com/basecs/a-gentle-introduction-to-graph-theory-77969829ead8) (Warning: Mathematics)
- Dijkstra's Algorithm
- A\* Algorithm
- [Sorting Algorithms](https://www.geeksforgeeks.org/sorting-algorithms/)
- [Data Structures](https://www.freecodecamp.org/news/the-top-data-structures-you-should-know-for-your-next-coding-interview-36af0831f5e3/)

Some JavaScript courses cover these topics. If that's the case, you can try skipping forward.

## Disclaimer

In this article, I've told you to skip over concepts and ignore large swaths of the language. This doesn't mean you shouldn't expect to learn these concepts eventually.

The reason for skipping concepts is that we, as individuals, don't use most of JavaScript most of the time.

Rather than focus on learning a specific concept, you should be writing code. Try to create situations where you need that concept - then revisit it.

This creates a basic virtuous cycle:

1. Write code until you find something you don't know
2. Learn the thing you don't know
3. Repeat

The crucial part is that you're out there writing code. I recommend checking out my post on [how to write JavaScript](https://dev.to/canderson93/how-to-write-javascript-when-you-don-t-know-where-to-begin-5f3f) and [finding project ideas](https://dev.to/canderson93/how-to-find-ideas-for-good-practice-projects-5hcm) to get you started.

----
[Are you stuck on JavaScript Tutorials? Sign up to my newsletter for more helpful articles to get you moving again](https://pages.convertkit.com/9f030a68c9/cd303b3d7b)