Graduates now work at →
Stripe
Shopify
Vercel
Netlify
GitHub
Linear
Figma
Notion
Stripe
Shopify
Vercel
Netlify
GitHub
Linear
Figma
Notion
async
map
closure
this
===
proto
console.log('welcome') // 4,200+ students enrolled

Stop watching tutorials. Start writing code that breaks, reading errors that teach, and building things that work — because you understand why.

No credit card. No pressure. Just JavaScript.

scroll to learn
// Question 01

Why does `this` change depending on where I call it?

The question that's broken more hearts than any other in JavaScript.

micro-lesson

`this` is about call-site, not write-site.

`this` isn't where your function lives — it's who calls it. In a method, `this` is the object. In a plain function call, it's `undefined` (or `window` in old code). Arrow functions inherit `this` from their parent scope and never get their own. Once you internalize "who's calling this right now?" — the confusion evaporates.

console.js
// Regular function — this = who calls it
const user = {
  name: "Maya",
  greet() {
    // ✅ this = user object
    console.log(this.name);
  },
  greetLater() {
    setTimeout(() => {
      // ✅ arrow fn: this = user
      console.log(this.name), 1000);
  }
};
user.greet(); // "Maya"
micro-lesson

A closure is a function that remembers its birthplace.

When a function is created, it carries a reference to the scope it was born in — even after that scope is gone. This is how counters, private variables, and module patterns work. It's not magic. It's just that functions in JavaScript are first-class citizens that travel with their luggage.

console.js
function makeCounter() {
  let count = 0; // private!
  return function() {
    count++;
    return count;
  };
}

const clicks = makeCounter();
clicks(); // 1
clicks(); // 2
// count is unreachable outside —
// that's the closure protecting it.
// Question 02

Do I actually need to understand closures?

Yes. And once you do, you'll see them everywhere — including in code you've already written.

// Question 03

Why does my code run before the data arrives?

JavaScript doesn't wait. Here's how to make it wait politely.

micro-lesson

JavaScript is single-threaded. Async is how it multitasks.

When you fetch data, JavaScript doesn't pause — it moves on and comes back when the data is ready. Promises represent that "coming back." `async/await` is just cleaner syntax for the same idea. The mental model: you're describing a sequence of things to do when they're ready, not blocking the whole thread to wait.

console.js
// ❌ This runs before data arrives
const data = fetch("/api/user");
console.log(data); // Promise {pending}

// ✅ async/await: readable, correct
async function getUser() {
  const res = await fetch("/api/user");
  const user = await res.json();
  console.log(user.name); // "Priya" ✅
micro-lesson

Classes are syntax sugar. Prototypes are the actual mechanism.

JavaScript doesn't have "real" classes like Java or Python. When you write `class Dog extends Animal`, the engine builds a prototype chain under the hood. You don't need to write prototype code daily — but knowing it exists means you'll never be surprised when `instanceof` behaves unexpectedly, or when a library's object mysteriously has methods you didn't define.

console.js
// What classes actually compile to:
function Animal(name) {
  this.name = name;
}
Animal.prototype.speak = function() {
  console.log(this.name + " speaks");
};

// class syntax does the same thing
class Dog extends Animal {} // ← prototype chain
// Question 04

Do I actually need to understand prototypes, or can I just use classes?

Classes are prototypes in a tuxedo. You should meet both.

JS

Get the JavaScript Roadmap

A structured path from confused beginner to confident builder — covering every concept this page just taught you, and everything after.

// no spam. unsubscribe anytime.

// curriculum preview

What you'll actually build

Every module is a project. Every project is something you'd put on GitHub. No filler, no theory-only lessons.

01
FoundationFREE

Variables & Scope

22 min3 projects
02
Core

Functions & Closures

38 min5 projects
03
Core

The `this` Keyword

31 min4 projects
04
Advanced

Async JavaScript

45 min6 projects
Start Free Lesson

// Module 01 — no account required

// student.stories

From stuck to shipping

I'd been stuck in tutorial hell for 8 months. Console was the first thing that made closures actually click — not just 'what' they are, but why they exist.

Tariq Osei profile photo

Tariq Osei

Junior Frontend Dev · Stripe

I quit my retail job with three months of savings and bet on Console. Got a developer role in 14 weeks. The project-based approach is the real deal.

Priya Nair profile photo

Priya Nair

Software Engineer · Shopify

Other courses taught me to copy code. Console taught me to read error messages. That one skill difference is enormous.

Marcus Webb profile photo

Marcus Webb

Frontend Developer · Linear

JS

Get the JavaScript Roadmap

A structured path from confused beginner to confident builder — covering every concept this page just taught you, and everything after.

// no spam. unsubscribe anytime.