A Green Square

JavaScript

JavaScript is a hot mess.

The lingua franca of the web was famously invented by Brendan Eich at Netscape in a single week. Many argue he should have taken two. Ever since it came out, its insane type coercion system has been driving developers to despair.

It is very necessary for any aspiring developer to learn JavaScript, and it is a great candidate for a first programming language to learn.

For one thing, it runs everywhere. Basically every web browser will run JavaScript and only JavaScript[1]. You can use it on the server too. That's all the places!

JavaScript learning resources

If you're just starting your JavaScript journey, you are best off starting with projects like you will find at either freeCodeCamp.org or The Odin Project.

If you prefer starting with a big text book for some reason, the best one is Eloquent JavaScript which is free to read online. But this is best as a supplement to your project-based learning. Do not get stuck in the details of the technical weirdness of the language without building stuff.

When you need a quick reference for something in JavaScript land, search "mdn" plus your search term. You will end up at the Mozilla Developer Network (MDN) Web Docs pages for JavaScript. This the best resource for human-grade, plain language information on this topic. If you end up looking at "the spec" at the World Wide Web Consortium (W3C), you've gone too far.

Think of MDN as how it is and W3C as how it should be.

What is TypeScript?

TypeScript is a superset of JavaScript that aims to solve the problem of JavaScript's awful type coercion behavior. Unlike plain old JavaScript, which is interpreted by your browser or runtime environments like Node.js, TypeScript needs to be compiled first.

TypeScript is either a make-work project for neat freaks or a vital link in the toolchain that adds some sanity to the JavaScript ecosystem, depending on who you ask.

Don't start with TypeScript if you are new to programming. It will be there waiting for you when you are ready.

Footnotes

  1. Actually, your browser can run basically anything now, thanks to WebAssembly. But it will run JavaScript natively!