A Better Way to Learn JavaScript

The why and the how of my fifth book

By: Ajdin Imsirovic 10 November 2019 | Last updated: 01 October 2021

This is the page for my book series: A Better Way to Learn JavaScript.

It’s a series of five books that grew from a single book I started writing in 2018.

My first book in the book series is called A Better Way to Learn JavaScript. In this article, I’m discussing the reasons for writing it and I’m discussing the book series’ progress.

A Better Way to Learn JavaScript, get first 5 chapters free Image by Ajdin Imsirovic

Why another JavaScript book?

I have yet to find a book on JavaScript that takes a reader from a complete newbie and lets them build up their skills and knowledge to the point of being confident in building something on their own.

I am not saying that there aren’t any good books out there.

But I am saying that there are few, if any, great books on JavaScript.

Obviously, there are many reasons for this. In this article, I’ll outline my approach and problems I tried solving while I was writing this book.

Technology moves fast, so a book must keep up with it

Technology moves fast.

In JavaScript land, a book written mere 12 months ago might already be outdated!

This is a major issue for the tech publishing industry. How can you cope with the pace?

One thing that comes to mind is writing evergreen books.

What I mean by that is, writing books that will constantly be updated.

Books that will change with the technology.

Books that you can issue in versions: 0.1, 0.2, …, 1.3.

Just like software!

That’s why I’ve chosen to self-publish my fifth book: A Better Way to Learn JavaScript.

Ok, so I’ve explained why I’m self-publishing this time.

Now, how is the teaching methodology in this book better than other books on JavaScript?

The missing staircase problem

There’s a pretty famous book on JavaScript in which the author eases in the reader in the first chapter, and then, by the end of the first chapter, the author gives a little practice exercise for the reader to solve.

The only problem, the exercise is too hard, and thus, pointless.

It’s as if you’d go to a gym, and the instructor shows you the proper way to bench-press 100 pounds. Then, after they’re done, they say: ok, now bench-press these 500-pound weights, for practice.

It’s a bit silly, and I’ve seen that again and again.

I call this the “missing staircase” problem. Rather than guiding you from one level of knowledge to the next, an author will often assume you can just “jump floors”.

I know superheroes are in vogue these days, but that’s a bit too much.

My solution:

  1. Explain a simple concept
  2. Don’t go into too many details - cover just enough needed for understanding
  3. Show variations to the problem that will make the reader both exercise and see the problem from a different angle
  4. Limit the “number of new concepts per page” ratio
  5. Have 20, 30, or 50 foundational concepts that you’ll repeat again and again throughout the book

Each of these high-level approaches to transferring knowledge need to be very well thought-through and applied in a book. Thus, a book needs a lot of preparation.

As an author of a technical book, you need to spend more time thinking how you’re going to write it than the time you spend on the actual act of writing.

Address the most commonly-faced problems

I was tasked at work more than one time to create some kind of a special navigation on a website. Most of the time, this involved a significant amount of JavaScript.


  1. Convert regular bootstrap navigation into a sidebar navigation with specific implementation in jQuery
  2. Add custom navigation that behaves differently on mobile and desktop, using Angular
  3. Implement various versions of navigation for A/B testing on the same site
  4. etc…

Never in my life did I have to write a drum machine with JavaScript (I did write one in my own spare time, but that’s another story).

My point is: any book for beginners needs to address common problems that they’ll be faced with at work.

It needs to be practical.

Alright, that’s it as far as the theory on why and how to write a JavaScript book for beginners.

Next, here’s the versioning history (in YYYY-MM-DD format):

version 2021-10-01

There’s been a large gap between my versioning and I don’t think it’s a smart investment of time to go through all the changes between older versions listed below, and this current update.

Instead of listing all the changes, I’ll just list the general highlights of all the changes up to now:

  • I’ve split what started as a single book into a series of five books:
    • Book 1: The Basics
    • Book 2: Built-in Objects
    • Book 3: Useful Snippets
    • Book 4: Mini Apps
    • Book 5: Advanced JavaScript
  • I’ve changed the cover for all five books in this newest update
  • I’ve added too much code and put in too much work into these books over the last several years to even try to list all the updates here. Instead, when I have time, I’ll split this single page into five pages, so each book will have its own page, with the list of table of contents, and chronological updates.

    version 2020-01-07, Updated Chapters 2, 3, 4, and 5, added Chapter 6

Updates in version 2020-01-07:

  • Fixed typos
  • Added better explanations
  • Added more examples of how to use the Quick Prototyper app provided at the end of Chapter 2
  • Added function generalization in Chapter 1
  • Added Chapter 6: The anatomy of an ES6 function - where we compare ES5 and ES6 functions

version 2019-11-11, Re-organized a lot of code in the first chapters

version 2019-11-10, Added new cover, changed book title

version 2019-05-02, Improved chapters 1 to 5

Feel free to check out my work here: