Skip to main content Accessibility Feedback

The best way to learn JavaScript in 2022

Yesterday, I got an email from a newsletter subscriber asking:

What’s the best way to practice JavaScript?

There’s no one right way to learn JavaScript. But after teaching it for a handful of years now, I have found some trends and common approaches that make things easier for a lot of students.

Let’s dig in!

Lean into your learning style

Some folks learn best by reading, others from watching videos, and others from just diving in and trying a bunch of stuff until things click.

I personally find that I learn best from reading a little and trying a little, then reading some more. I know a lot of folks who prefer to watch videos initially, then read later to reinforce what they learned.

When you can, try to find resources that fit your learning preferences.

Put what you learn into practice

One of the biggest challenges I hear from folks who are learning is making that jump from “I learned these methods and techniques” to “I know how to apply these techniques” is really hard.

The most effective way I’ve found to bridge that gap is by working on real projects.

Don’t try to go too big, too soon with your projects

Where I see most students get stuck with project work is trying to do projects that are too big, too soon.

Don’t jump right into building a todo app or an ecommerce platform or anything like that. You want to start small. Like, really small. For example…

  • write a script that shows a piece of hidden content when a button is clicked. When you click it again, hide the content again.
  • Once you’ve got that figured out, you can modify it to work like an accordion, where opening one piece of content closes all others in a group.
  • Then you can add more features and details, like letting users pass in their own options or settings

Start really small, and layer in more complexity as you learn.

(I’m actually working on a new product that will provide this kind of thing in a more guided, structured way.)

Learning inertia is more important than picking the right tools

I see a lot of learners get hung up on which tool to choose.

Should I learn vanilla JS or React first? A framework or jQuery?

Honestly, it doesn’t matter. The most important thing is that you pick something that you find easiest to get started with, the thing that takes you from idea to “I built a thing that works” fastest.

Inertia is more important than perfect.

You can learn a framework or library more easily if you build a solid foundation of vanilla JS skills. If a library clicks more easily for you, you can back into vanilla JS later (I learned jQuery first, then backed into vanilla JS).

Don’t overthink it!