Learning Javascript

Sun, Nov 15, 2020 4-minute read

Because I found working with D3.js quite enjoyable, I decided to dive deeper into the underlying technology: JavaScript. The whole web ecosystem is huge. Even if you choose a specific stack of web technologies to learn, there will still be loads of stuff to learn.

JavaScript, in particular, is kind of weird. This could be either because the underlying logic is different from what you’d expect in other languages or because it is actually weird. Either way, I feel that learning JS needs more attention that is totally separate from learning frameworks and libraries.

So, without further ado, let me describe how I am currently learning JavaScript, and share some resources along the way.

Building stuff

It isn’t a new discovery, but learning by doing is essential in programming. I have been building visualizations for almost a month using JavaScript, D3.js, and React. You can check my work on my VizHub profile. Most of these visualizations are from Curran Kelleher’s course Datavis 2020. Also, every now and then, I run across an issue or think of something that I want to do, then I refer to the MDN documentation to look at a function or something that solves my issue.

When you learn by doing, you immediately make something tangible with your newly learned concepts, which usually pushes you to learn more. Also, when you code up a full project, you are in close contact with the practical setting, and you learn how to connect small pieces together instead of learning each piece in isolation. The disadvantage is that sometimes you end up writing chunks of code that you don’t fully understand. This might be okay if it works for the current use case, but it would cause problems if you make changes in the code that lead to unexpected changes in the output.

Solving algorithms

A different type of learning by doing is algorithms exercises, which I am doing on HackerRank. Instead of more or less practical projects, these problems are simpler and more technical. For example, you might be asked to compare two arrays and give them scores according to specific criteria.

I like these types of exercises because when you start translating business logic into code, most of it will end up like those exercises. Also, each exercise usually lets you focus on a small number of low-level concepts, which makes practicing the language easier. As much as I love them, they still wouldn’t be able to replace actual projects which have business logic and connects more than one low-level problems together.

YouTube tutorials

I guess this could be the most common way of learning among programmers and especially web developers. Currently, I am watching the playlist “JavaScript From The Start” by Steve Griffith. I like that it is huge and tackles many concepts, one at a time in short videos.

YouTube tutorials in general are great in presenting introductory concepts or explaining them in a human-friendly way if documentation is hard to start with. They are also quicker than other ways of learning. The speed factor, however, becomes a problem when there is no practice. If you learned something quickly, you will forget it just as quickly. So, YouTube tutorials are rarely useful by themselves.

Reading

The book of choice for my reading is You Don’t Know Javascript. I chose it after getting a number of recommendations on a LinkedIn Post. I read the first two chapters (of the “Get Started” book) so far. I really like that book because it doesn’t repeat what I learn in other resources but rather complements it. It does go over the very basic concepts, but it addresses why things are the way they are instead of just “how to code X in JS”.

In general, I think books are great for deep dives or getting detailed education about a concept. But they unfortunately fail with technologies that are constantly updated, in which case you either have to learn on an older version of the technology or try to work along with the latest version until something blows up.


I believe that combining multiple resources is the best way to learn a skill, and that’s what I am doing here with JavaScript. If you want to learn it as well, consider these to be my recommended resources.