3 ms·
I don't really see the need for the extend at all. In fact if you don't use it, it will work the same as example 1 and you'll still have access to self. Or you
by doomslice 14y ago
I don't really see the need for the extend at all. In fact if you don't use it, it will work the same as example 1 and you'll still have access to self.
Or you can just do this.foo = foo; this.value = value; at the end instead of returning an Object.
- platz 14y agoYes extend is unnecessary in this case. The key was saving a reference to self.