Frontend · interactive
What is this?
In JavaScript, this inside a regular function is decided at call time by how the function is called: usually the object before the dot. Pass the method somewhere else and the dot is lost.
const user = {
name: "Ada",
greet() { return `Hi ${this.name}`; },
};const greet = user.greet; greet();
→ TypeError: Cannot read properties of undefined (reading 'name')
Called as a plain function, with nothing before the dot. In strict mode and modules, this is undefined.
Call it as
Step 2 of 4 · read left to right
In production
Tools and technologies
Every JavaScript developer meets this eventually.
Not tied to one language — use these names when you search docs or design a system.