completefrontend

What to learn after JavaScript basics

Once variables, loops, and functions feel easy, learn to work with real data, then how JavaScript runs your code, then async code and the browser. After that, choose React, TypeScript, or the engine. Here's the path, and why the order matters.

Five steps joined by arrows: the basics, real data, how JavaScript runs your code, async code, and the browser

Once you can order a coffee and ask for directions in a new language, the phrasebook has done its job. More phrases won't help much now. What helps is grammar: the rules that let you say things nobody taught you. JavaScript has the same turning point.

After the JavaScript basics, learn to work with real data (objects, arrays, and their methods), then how JavaScript runs your code (scope, closures, this, and prototypes), then asynchronous code and the browser (the event loop, promises, the DOM, and fetch). After that, pick a framework like React, add TypeScript, or go deeper into JavaScript itself. Here's that path step by step, and why the order matters.

How do you know you're past the basics?

You're ready to move on when you can do these without looking anything up:

  • Store values with let and const, and know which to use. See variables.
  • Make decisions with if and else, and repeat work with loops. See conditions and loops.
  • Write a function that takes parameters and returns a value, in both regular and arrow form. See functions and arrow functions.
  • Write a small program on your own, like one that adds up a shopping list.

If any of these feel shaky, give them another week. Everything after this stands on them.

What should you learn next?

Learn these in order. Each stage uses the one before it.

Working with real data

Most real code takes data in one shape and turns it into another: a list of products into the names that are in stock, or a reply from a server into what the page shows. Learn objects and references, map, filter, and reduce, destructuring, spread and rest, Map and Set, and JSON.

const products = [
  { name: "Tea", price: 4, inStock: true },
  { name: "Cake", price: 6, inStock: false },
];

const names = products
  .filter((product) => product.inStock)
  .map((product) => product.name);

console.log(names); // ["Tea"]

When code like this reads naturally to you, you're ready for the next step.

How JavaScript runs your code

This is where JavaScript stops surprising you. Learn scope, closures, the this keyword, type coercion, the prototype chain, classes, and error handling.

These ideas are hard because you can't see them in the code. A closure looks like an ordinary function, and this looks like an ordinary word. Step through the examples until you can predict what each line does before you run it.

Asynchronous code

Anything that waits, like a timer, a click, or a reply from a server, is asynchronous. Learn the event loop, promises, async and await, and running work in parallel. Without these, code that loads data will keep doing things in an order you didn't expect.

The browser

Now put it all on a page. Learn the DOM, events, event delegation, form validation, fetch, and localStorage. This is where the earlier stages pay off: a list that won't update, or a click handler that sees an old value, often comes down to data, closures, or async.

Modules and tools

Real projects are split across many files and use packages other people wrote. Learn import and export, npm and package.json, and what a bundler does.

A path from the basics through real data, how JavaScript runs your code, asynchronous code, and the browser, which then branches into three next steps: React, TypeScript, or going deeper into JavaScript
Learn the language in order, then choose where to go.

Why not jump straight to React?

Because most of a React component is JavaScript. React adds a few things of its own: components, JSX (the markup inside the code), and functions like useState. Everything else in a component is plain JavaScript.

  • A component is a function that returns markup.
  • Lists on the page are made with map, and filtered with filter.
  • Props and state are pulled apart with destructuring.
  • New state is made with spread, as a copy, never by changing the old object.
  • Data from a server arrives through promises.

When those parts are new, React feels like magic that breaks for no reason. When they're familiar, React is a small set of new ideas on top of things you already know. A classic example is the stale closure: a handler created during one render keeps that render's values. It looks like a React bug, but the cause is ordinary JavaScript closures.

The JavaScript you need for React lists every part React leans on, with the lesson that teaches each one. When it all looks familiar, start the React course.

When should you learn TypeScript?

Once the JavaScript in this post feels comfortable. TypeScript is JavaScript plus a way to write types in the code itself. It adds no checks when the code runs: browsers run only JavaScript, so the types are removed before the code reaches them. Every rule you learned about closures, this, and the event loop still applies.

Adding types to JavaScript shows what types catch, and the TypeScript course takes it from there.

What should you build along the way?

Small projects make each stage stick. Build one at the end of each:

After Build Practice problem
Real data A shopping cart that totals prices and splits items into in stock and sold out Partition an array
How it runs A counter with private state Counter with private state
Async code A function that retries a failed request Retry with backoff
The browser A to-do list that saves itself Todo list

The JavaScript coding challenges have tests that tell you exactly what works and what doesn't, which makes them a good check that you really learned each stage. For anything else, try ideas in the playground.

Do you need to learn how the engine works?

Not to build things. The JavaScript course goes all the way down, into how engines compile and optimize code, like hidden classes, and how the browser's event loop works in depth. Come back to those stages once you're building real apps and want to know why some code is fast and some is slow. They answer questions the earlier stages only point at.

Where do you go from here?

Open the JavaScript course and find the first stage where the lesson titles feel unfamiliar. That's your next step. To see how long each stage takes, read how long it takes to learn JavaScript. When you want to test yourself, the JavaScript interview questions are a good check of the middle stages, even if you're not interviewing yet.