JavaScript Guide

JavaScript is the language of the web browser and, through Node.js, of a good deal of server code too. It is flexible and forgiving, which makes it easy to start and just as easy to write confusing code in. Most intermediate problems come from a short list of topics: how asynchronous code works, how objects and copies behave, how scope resolves, and how to handle errors without hiding them.

Learn the core language before any framework: variables and scope, functions, objects and arrays, the array methods that replace most loops, and modules. Then spend real time on asynchronous programming, because almost everything interesting in a browser, such as network requests, timers and user input, is asynchronous. After that, the browser APIs for storage, files and background work, plus a few well-chosen libraries, fill in the rest.

The reading list is arranged in that order: language fundamentals and patterns, asynchronous JavaScript, browser and platform features, and finally the libraries and tooling that come up in real projects. Library comparisons are snapshots of the year they were written, so check the current state of any project before you adopt it.

Reading list

Language fundamentals and patterns

How objects, copies, loops and newer language features really behave.

Asynchronous JavaScript

Promises, async code and error handling.

Browser and platform features

Storage, workers, files and internationalization.

Libraries and tooling

Comparisons of the libraries and tools you are likely to meet.

Want more? Browse every article in the JavaScript category.