Hint
Arrow functions capture the enclosing scope's variables directly. Object method arrows don't use this β they close over the lexical value.
function makeObj(value) {
return {
value,
getValue() { return this.value; },
getValueArrow: () => value,
};
}
const obj = makeObj(42);
const fn = obj.getValue;
console.log(obj.getValue());
console.log(fn());
console.log(obj.getValueArrow());42 undefined 42
Explanation: obj.getValue() β this=obj, returns 42. fn() β this is global/undefined, this.value=undefined. getValueArrow: arrow closes over makeObj's "value" param (42) at creation β ignores this entirely.
Key Insight: Arrow functions capture the enclosing scope's variables directly. Object method arrows don't use this β they close over the lexical value.