JavaScript
Result
Run
License
class MyTypedArray extends Int8Array { static get [Symbol.species]() { return Array; } } // 생성자를 변경하므로 인해 에러 발생 // TypeError: Method %TypedArray%.prototype.map called on incompatible receiver [object Array] new MyTypedArray(0).map(item => console.log(item));
Console
expand_less
License
License
by DevDic
Close