michael.lee.theriot at gmail.com (2016-05-05T07:25:27.722Z)
I believe you can do this with `Reflect.construct`.
```js
function SubArray(arg1) {
return Reflect.construct(Array, arguments, new.target);
}
SubArray.prototype = Object.create(Array.prototype);
Reflect.setPrototypeOf(SubArray, Array);
var arr = new SubArray();
arr instanceof SubArray; // true
arr instanceof Array; // true
arr[5] = 0; // should exotically update length property
arr.length === 6; // true
```
edit: fixed an issue mentioned below
I believe you can do this with `Reflect.construct`. ```js function SubArray(arg1) { return Reflect.construct(Array, arguments, SubArray); } SubArray.prototype = Object.create(Array.prototype); Reflect.setPrototypeOf(SubArray, Array); var arr = new SubArray(); arr instanceof SubArray; // true arr instanceof Array; // true arr[5] = 0; // should exotically update length property arr.length === 6; // true ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160503/feab3846/attachment-0001.html>