State of JavaScript Report

The most recent State of JavaScript report was released about a month ago. This is the second iteration of this report. You can access the report at While you are there, make sure you sign up to be a part of the next report.

This years report had over 20,000 respondents. That is more than double the amount from last year. They have also included some interesting charts to try and provide color to this year’s data.

If you have not signed up to be a part of this report each year, you need to head over to the website and sign yourself up. The more people that participate, the more accurate the data.

There are some interesting data points in this survey; especially when you compare it to last years data. I did a quick YouTube video on my thoughts. Take a look at it and then leave your comments about the report.

Dealing with Mutable Data

In JavaScript Objects are mutable, which simply means they can be changed. I think the first time I heard this statement I thought “Yeah, so big deal.”. Well, it can be a big deal if you don’t understand what that mutable nature means. It can cause unexpected issues.

In this tutorial that I recently published I talk about the issues you can run into and provide some examples. The examples shows how the mutable nature of objects can cause some unexpected consequences.

I then followed up this tutorial with a second tutorial that shows a possible solution. The solution is cloning objects. This is a technique commonly used in functional programming and is great to be aware of. I think the two tutorials together can be a great help.

What tutorials would you like to see?

Creating a Function that can Remember Data

I recently released a tutorial about creating functions that remember data. This can also be referred as “retaining state”. This is a great feature of JavaScript and it reflects what I feel is one of the strengths of JavaScript.

This technique uses closure, but it uses it in a way that my not be intuitive, even to those that understand closure well. The basic idea is that your invoke a function that returns a function, and that returned function has access to (remembers) any data that was passed to it or establish at the time the function was returned.

This can be a powerful feature. Take a few moments and watch the tutorial and then tell me what you think.

Storing Data in a Browser

At times you may come across the need to store some data in the browser so that when the user returns, you already have that data available. This can help solve a problem that might require the connecting and passing data to a server. But I have also found situations where even though I am passing data to a server it is helpful to store some data in the browser to ease the experience for the user.

I’ve recently published two tutorials on ways to store data in the browser. One uses localStorage and the other uses indexedDB.

LocalStorage is a pretty simple solution, but it does have some limitations such as the data can only be a string and there is a limit to how much data you can store. IndexedDB overcomes those limitations, but it is not quite as simple to use as localStorage.

Watch these two tutorial to dive deep into storing data in a browser.

Upcoming Courses in JavaScript: Vote with Your Comments

During the past year I have released what I perceive are the two most time consuming courses to develop: Learn Modern JavaScript: Getting Started and Learn Modern JavaScript: Advanced Topics.

Since the release of the Advanced Topics course I have been hard at work on adding a section to that course on functional programming concepts as well as a new course on regular expressions. And now I have begun to think about what courses should come next, and I would like your input. Here are a list of some of the courses sitting in the wings. (You can get a full list of upcoming topics here.)

  • Full course on functional programming concepts in JavaScript. Functional programming is the talk of the town in JavaScript. And it is important to know these topics.
  • Asynchronous Coding. This course is an important piece in the Learn Modern JavaScript series. These are critical topics that need to be tackled.
  • Using Node and Express. I have stayed away from node in my JavaScript courses because I think it is important to learn JavaScript on the browser side. I feel I need to add this course in order to fill in the knowledge of how JavaScript can be used.
  • jQuery. Yes, jQuery is not the darling child anymore, but it is still used extensively, so it is important to know how to use it effectively.
  • JavaScript Frameworks and Libraries. There are numerous topics here, but those that seem to drift to the top are Vue, React and Angular.

So which topics are most important to you? Let me know in the comments sections.

Functional JavaScript: Some People Love it

For the past six months or so I have been on a journey of discovering functional programming in JavaScript. When I first started, I could understand very little of the terminology or the concepts. It all seemed very foreign to me. But I persisted.

I now feel like I get it. I understand the power behind the paradigm. I understand the concepts. And…I must admit that I like it.

One thing I have noticed as I have read different articles and books on functional programming in JavaScript, is that people that are in to it are really in to it! They love it! Here is an example of one article I found recently. It is an interesting read and helps point out some of the positives of functional JavaScript. But you also lear how the author feels about functional programming.

How I rediscovered my love for JavaScript after throwing 90% of it in the trash

Reading this article caused me to ask a question: Do those that love  functional JavaScript love it because they get it? I really wonder. Help me out here. If you understand the ins and outs of functional programming in JavaScript but would rather use another paradigm like OOP, comment below. I would love to hear about it and why.

Performing a Case-Insensitive Sort on an Array of Strings

I recently released a tutorial on the All Things JavaScript YouTube channel that dealt with higher order functions. Within the tutorial I used an example that dealt with forcing the sort method of Arrays to do a true alphabetic sort. By itself, sort does not do this.

Here is the problem with sort. Lets say I have an array of strings like this:

let things = [‘Building’, ‘Car’, ‘house’, ‘tree’, ‘bicycle’, ‘automobile’];

It will not sort correctly if I use:


The reason is that I have a mixture of upper and lowercase characters. The uppercase characters will sort first and we end up with this.

‘Building’, ‘Car’, ‘automobile’, ‘bicycle’, ‘house’, ‘tree’

The solution is pretty simple; we just need to sort with the correct case. However, executing on that solution is not quite as simple. There are a number of different ways to do this. In the tutorial I chose to take advantage of a little known feature of sort; you can pass in a function to the sort method that can be used to determine the sort order. That makes sort a higher order function, and that was the reason I was using it as an example in the tutorial.

The end result is kind of cool.

If you would like to understand higher order function better or you are interested in the sort solution, take a look at this tutorial.

Dealing with Special Characters

The back slash character has special meaning in JavaScript strings. It is an escape character that allows us to enter special characters that would be difficult to enter otherwise.

Now most of my life I have been slash deficient. When someone says forward slash or back slash, I don’t know which character it is. Some have tried to explain it by telling me to imagine a person leaning backwards or forwards. But that doesn’t help me at all because I don’t know which side has the face.

Anyway, I digress. This is a back slash (\). Now we are all on the same page. This character allows escape sequences in strings that can insert special characters. JavaScript has some default escape characters, but the real power begins when you use unicode or hexadecimal character codes. To specify a hexadecimal character enter \x and then the hex code. For unicode, enter \u and then the code.

I think the biggest trick with these charaters is knowing the code to enter to get a certain character. Here are a couple of websites that have unicode and hexadecimal codes for characters:

Once you have a list of codes, most people are good to go. But if you need a little more guidance, here is a recent tutorial on special characters in JavaScript.

Which JavaScript Book has Taught me the Most?

I recently posed an interesting question to myself: Which JavaScript book has taught me the most?

Now I own many books on JavaScript. Some are specific to a framework, but most apply to vanilla JavaScript. But I didn’t limit my question to any subset of JavaScript. If it had anything to do with JavaScript, it was a candidate.

I enjoy books, so it was a fun exercise to go through each of my books and try to make a decision about which ones have taught me the most. Now to be fair, there are a few books I own that I have not finished reading. One I just purchased and haven’t even started yet. Now the whole process was very subjective, but the results were interesting; at least they were interesting to me.

In the end Douglas Crockford’s book JavaScript: The Good Parts didn’t make the cut for the final three. It was close, but I felt I needed to go with another book. Also, none of Kyle Simpson’s books made the top three. I have really enjoyed his books, but I was looking for the books that have taught me the most.

So here are the top three…

David Flanagan’s book JavaScript: The Definitive Guide was probably my top choice, not because I have sat down and read this book cover to cover, but just because how much I have referred to this book. This book is usually one of the first locations I go to when I have a question. It is a book I trust, so I usually weigh information on the internet with the information contained in this book. I’ve owned more than one edition of this book throughout the years. I think it was probably the first JavaScript book I purchased. Anyway, I’m pretty certain I have spent a good deal of time in this book and it has taught me a lot.

Next I chose JavaScript Patterns by Stoyan Stefanov. This book expanded my view of JavaScript and what it can do. Everything in this book is very practical. It is a concise book, but has a lot to offer. Some of the most important patterns I use, I first learned from this book.

My third choice was a bit of a surprise. I’ve been interested in functional programming of late, and I think that interest may have affected my choice. The third book is Functional Programming in JavaScript by Luis Atencio. Functional programming is a different paradigm from what I am used to, so obviously there is a lot to learn. Though this book is not the only source I have learned functional programming from, it has provided a good deal of information.

So there you have. My top three. Are there books you would add to the list? Which book taught you the most?


What the Heck is Memoization?

OK, I admit it. I went through a phase when I first heard the word memoization where I ignored that it existed. After all, what could a technique with a name like that have to offer me?

Well, I finally threw away my pride, admitted it might be valuable and spent some time learning about it. Yes, it is a technique used in functional programming, but it is a technique that can be applied to any coding paradigm. And it can be quite valuable.

So to make my penance complete, I thought it appropriate to do a tutorial on memoization.

Now don’t let the term scare you off. It really is not a complex concept. The patterns for implementing it are a bit involved, but the concept itself is pretty easy to understand.

I just published the tutorial on memoization and you can access it below. Take a look and give me your thoughts.