---
title: "Why Does JavaScript’s this Change When a Method Becomes a Callback?"  
description: "Why Does JavaScript’s this Change When a Method Becomes a Callback?"  
author: "Arnaud Simon"  
published: 2026-10-27  
canonical: https://answers.mindstick.com/qa/118414/why-does-javascript-s-this-change-when-a-method-becomes-a-callback  
category: "Mix Category"  
tags: ["javascript", "programming", "web development"]  
reading_time: 1 minute  

---

# Why Does JavaScript’s this Change When a Method Becomes a Callback?

I understand why `user.greet()` can use the `user` object, but I get tripped up when I pass that same method somewhere else as a callback. It may work when called directly, then fail or produce an unexpected value after being detached.

```js
"use strict";

// The method reads name from whichever object is bound as this.
const user = {
  name: "Mina",
  greet() {
    return `Hi, ${this.name}`;
  }
};

// Calling through user binds this to user.
console.log(user.greet());

// Saving the method alone does not preserve that object binding.
const callback = user.greet;
console.log(callback());
```

Is the key idea that `this` depends on how a function is called rather than where it was written? I’d also like to know when people reach for `bind()` versus an arrow function in real code.


---

Original Source: https://answers.mindstick.com/qa/118414/why-does-javascript-s-this-change-when-a-method-becomes-a-callback

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
