A Smarter Way to Learn JavaScript

Last week, I wrapped up the last few chapters of A Smarter Way to Learn JavaScript by Mark Myers.

If you’re looking to learn the basics of JavaScript, I recommend it. Get the Kindle version and view it in the Kindle app on your Mac or iPad. You can even try a sample first to see if you like it.

The book has nothing but glowing reviews on Amazon, which I usually find to be suspect. But I tried the book out and I can see why everyone likes it. I’ll explain why below.


Chapters are in small, digestible chunks

Some chapters are only two or three pages when viewed in the iPad’s Kindle app. This hyper-focus is great when paired with the repetitive online exercises. It also makes it easy to schedule some quick, meaningful learning into your busy schedule.

Repetition

The online exercises are highly repetitive, which is almost the antithesis of the Codecademy try-it-once-and-move-on approach. You’ll be drilled on the same thing two or three times at least, making it more likely that you’re going to retain what you’re learning.

I can’t emphasize enough how meaningful the repetition is.

It teaches you JavaScript

As opposed to common frameworks.

I have nothing against frameworks. I have already used and studied some jQuery, which I intend to use more and more as I learn.

But as someone who has used jQuery before getting very deep into JavaScript, I can say that jQuery makes a lot more sense after learning the pure JavaScript way to achieve things.

By the end of the book, you will be able to type document.getElementById(“div1”); in your sleep.

Word problems

The prompts for all of the exercises are written in full sentences. This gives you many opportunities to experience taking a request in plain English and turning it into code.

Here’s an example of a word problem:

Code the first line of an if statement that tests whether there are at least 2 characters after the dot in a string represented by a variable. Use the length of the variable to measure. Use <.

Even if that makes no sense to you now, it would be abundantly clear by the time you get to the exercise in the course of reading the book. You will be walked there gently

Strict code checking

One issue I’ve seen with some online coding courses is that in certain exercises it’s possible to pass when you have the wrong answer. It’s frustrating when you’re not sure why and dangerous when you don’t even realize it’s happening.

Another issue is that some online courses are only checking for the correct answer. Since there are often a number of ways to arrive at a given answer in coding, it’s possible code your way around the subject at hand.

The exercises for A Smarter Way to Learn JavaScript enforce a specific format and style that you cannot deviate from, even by an extra space. There is exactly one passing answer, and you either get it right or you don’t. Certain elements of style enforced are not even required by the language itself: (3 * x) will pass, but (3*x) will not.

Sounds strict, right?

I have found that having these limitations imposed on me by the book’s author has been helpful as it makes me be very intentional about how my code is styled.

Also, strict code checking requires me to fashion code related to the topic of the chapter. I can’t just fall back to familiar workarounds if I don’t understand something.

Timed typing exercises

Timed typing for coding has made me a better typist without question. I think I was already relatively fast in typing English and Japanese, but I will admit that there were parts of the keyboard that I couldn’t get without looking: mostly punctuation that is infrequently used in human language, but is the nuts and bolts of programming languages.

When you only have 30 seconds to nail a statement that includes = + [ ] () , you start to look at committing some muscle memory to those keys.


If you’ve made it this far, just get the book already. There are 89 chapters that probably take an average of 20 minutes max each, including the exercises. If you can manage a chapter at morning, noon, and night, you’ll be done in a month and will have a solid start in learning JavaScript.