liveBook · Manning

This

In JavaScript, the this value is determined by a function’s call context or, for an arrow function, inherited lexically.

How 7 Manning books explain it

Secrets of the JavaScript Ninja, Second Edition

The implicit JavaScript function binding whose value is determined by how the function is called.

How it is used
Determines which object function code accesses through `this`, especially in methods, constructors, and callbacks.
How deep it goes
Works through four invocation forms and callback remedies, while deferring detailed event handling.
Examples
Contrasts calls through two objects and traces a click handler that updates the wrong object.
What you can do after
Diagnose/debug with it when callbacks lose their intended context, then use `bind` or an appropriately placed arrow function.

Read how Secrets of the JavaScript Ninja, Second Edition explains this →

Secrets of the JavaScript Ninja, Third Edition

JavaScript syntax that evaluates to a function's call-dependent or lexically captured this value.

How it is used
Explains why a function’s context changes across direct calls, method calls, constructors, and explicit invocation.
How deep it goes
Works through invocation rules and arrow-function capture, including strict-mode exceptions, without descending into runtime implementation.
Examples
Contrasts direct and object-property calls of one function, an extracted class method, and an arrow-function event handler.
What you can do after
Diagnose/debug lost context in extracted methods and callbacks by identifying the invocation form or lexical capture.

Read how Secrets of the JavaScript Ninja, Third Edition explains this →

Essential TypeScript 5, Third Edition

The this value is the object or other value associated with a JavaScript function invocation or lexical function context.

How it is used
Controls which object’s properties methods and callbacks read, particularly when a function is detached or used as an event handler.
How deep it goes
Works through stand-alone calls, methods, call, bind, and enclosing arrow functions, then applies the behavior to a TSX handler.
Examples
Contrasts direct and detached message calls, repairs a price-display method with bind, and uses arrow handlers in a TSX product item.
What you can do after
Diagnose/debug with it when detached methods read unexpected properties, and choose bind or an enclosing arrow for consistent callback behavior.

Read how Essential TypeScript 5, Third Edition explains this →

JavaScript in Depth

The JavaScript this value associated with a function invocation, determined by its call-site context.

How it is used
Explains how JavaScript associates a function invocation with an object, globalThis, or undefined.
How deep it goes
Defines call-site behavior, four regular-function rules, arrow capture, prototype receivers, and common binding failures.
Examples
Uses shared drawer methods, destructured cabinet methods, explicit call/apply, bind, and a browsable prototype listing.
What you can do after
Diagnose/debug with it by tracing call sites, identifying binding precedence, and restoring receivers with call, apply, or bind.

Read how JavaScript in Depth explains this →

Acing the Frontend Interview

The this binding is the runtime association that determines the value of this within a JavaScript function invocation.

How it is used
Uses this to reason about JavaScript execution, runtime context, event handlers, and technical interview problems.
How deep it goes
Progresses from basic function and object usage through bind, call, apply, events, framework context, and API design.
Examples
Uses function and object scenarios, event handlers, bind, call, apply, arrow functions, and framework context problems.
What you can do after
Diagnose this bugs and apply bind, call, apply, and arrow functions when handling runtime context.

Read how Acing the Frontend Interview explains this →

Build a Frontend Web Framework (From Scratch)

The JavaScript binding that determines the object supplied as the this value during a function call.

How it is used
Binds component render and event-handler callbacks to the component instance so state updates target the intended component.
How deep it goes
Explains callback binding, contrasts class methods, and implements explicit binding with call(), without surveying all JavaScript binding rules.
Examples
Uses a counter component, an increment button, and a parent handling a child’s emitted event.
What you can do after
Apply it via Function.call to preserve component context in render callbacks and event handlers.

Read how Build a Frontend Web Framework (From Scratch) explains this →

The Joy of JavaScript

this is a JavaScript binding whose value depends on the call site and refers to the current execution context or receiver.

How it is used
Uses this to access object state while decomposing a hashing method into smaller, composable functions.
How deep it goes
Explains context assumptions, dynamic binding, and explicit-parameter refactoring, but does not develop a complete call-site taxonomy.
Examples
Uses assemble, computeCipher, calculateHash, bind, and explicit object arguments in hashing examples.
What you can do after
Diagnoses hidden context dependencies and refactors this-based property access into explicit, composable functions.

Read how The Joy of JavaScript explains this →

What to know first

Related concepts

Questions about this

What is this?

In JavaScript, the this value is determined by a function’s call context or, for an arrow function, inherited lexically.

Which Manning books explain this?

Secrets of the JavaScript Ninja, Second Edition, Secrets of the JavaScript Ninja, Third Edition, Essential TypeScript 5, Third Edition, JavaScript in Depth, Acing the Frontend Interview, Build a Frontend Web Framework (From Scratch) and The Joy of JavaScript.

What should I know before learning this?

Manning books that teach this usually introduce function, arrow function, object and strict mode first.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.