Why JavaScript is (not) the best first language to learn

Clyde Bates
Jul 8 · 3 min read

This article is going to touch on a common tech interview question — “why did you decide to learn <insert language here> first?” and what I think the proper response should be. My first language was JavaScript, and so I’ll be focusing from that vantage point when thinking about this question. You see, JavaScript is both the best language to learn first, and not the best language to learn first. The reason it is not is quite simple — there just isn’t a “best first language”. Doesn’t exist. Next question please.

But really, the whole idea of one language being “better” than another is a bit erroneous. There’s certainly preferences — but those are subjective, and often just matters of preferred syntax. And there’s also best-case languages, in other words, languages that are best suited to the job/project you’re on— but that wasn’t the question. The truth is, all languages do the same thing. They translate human intentions into machine instructions. And that is the important thing. It doesn’t matter which language you learn first, what matters is that you learned a language. You learned how to talk to a machine, how to get on its level and think like it thinks. You learned a level of cognitive reasoning that makes you incredibly well suited to work in ANY language. If you can learn one language really really really well, it’ll be a piece of cake to learn another. The real skill isn’t knowing how to solve the problem, it’s what questions to ask to get to the answer. That’s what learning a language — any language — will teach you.

All that being said — JavaScript is a great first language. Let’s delve a little bit into why that is…

JavaScript was invented in 1995 by Brendan Eich, who worked at Netscape at the time. This was during the time that Netscape enjoyed being the world’s most popular Web Browser (imagine that). Also at this time was a company quickly picking up A LOT of steam and looking more and more like a monopoly on tech each day. That’s right, you guessed it, Microsoft. See, Netscape didn’t want to lose this battle for the world wide web. JavaScript was currently being developed as a powerful server and client side language up to this point. But when Netscape decided to wage war on Microsoft, they responded to the Internet Explorer project with a quick standardization of the JavaScript language and an unlikely partnership with Sun, the creators of Java. With all this, sights were set to have JavaScript become the companion language to Java. So that quick jump from “powerful server and client language” to “web companion to Java” is the reason for many of JavaScripts most hated quirks, like automatic type coercion. Because of this unfortunate marketing decision (which really didn’t do much for Netscape in the end, as we all know), JavaScript was merely a browser language for nearly two decades. However, during this time, JavaScript became the de-facto leader of web languages. It’s hard to find a website that doesn’t use it. Which is my point #1 of why it’s a great first language to learn.

All of that brings us to 2009 — the release of Node.js

With the release of Node.js, JavaScript finally realized its full, original potential and moved out of Browser Jail. Now, you can learn ONE language and be a full-stack developer. Node.js “is a highly customizable server engine that uses non-blocking event-based input/output model.” What this means, basically, is that we can now use JS to create server apps, not just client apps. This makes JavaScript incredibly well rounded, being the leader in browser development that is still able to be a fully-fledged backend language.

So there ya have it. There’s no real best first language, but I’m glad I learned JavaScript first. It is, in my opinion, the fasted route to a full stack understanding. That being said, just keep in mind… There is no best language.