# How does super work as an object？

**URL:** <https://es.discourse.group/t/how-does-super-work-as-an-object/1279>\
**Category:** I have questions\
**Created:** [April 6, 2022, 9:26am UTC](https://es.discourse.group/t/how-does-super-work-as-an-object/1279 "2022-04-06T09:26:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![senocular](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/senocular/32/642_2.png) [@senocular](https://es.discourse.group/u/senocular)\
**Post date:** [April 6, 2022, 1:13pm UTC](https://es.discourse.group/t/how-does-super-work-as-an-object/1279/4 "2022-04-06T13:13:00Z")

</div>

> [@aclaymore](#):
>
> So now we no longer have to think about `super`, and only look into the difference between [Reflect.set](https://tc39.es/ecma262/multipage/reflection.html#sec-reflect.set) and [Reflect.get](https://tc39.es/ecma262/multipage/reflection.html#sec-reflect.get).

I think its worth pointing out that MDN does a bad job with the role of receiver with respect to set. It's description for the receiver argument is simply:

> The value of `this` provided for the call to `target` if a setter is encountered.

This ignores the very important fact that when present, if not calling a setter, the receiver becomes the target for the property being set.

```javascript
const a = { x: 1 }
const b = { x: 2 }
Reflect.set(a, 'x', 3, b) // sets on b, not a
console.log({a, b}) // a: { x: 1 }, b: { x: 3 }}

```

Especially important in this particular case since that's exactly what's happening with super and `this` in:

```javascript
Reflect.set(Reflect.getPrototypeOf(B.prototype), "x", 3, this); // super.x = 3;

```

---

_[View the full topic](https://es.discourse.group/t/how-does-super-work-as-an-object/1279)._
