How to subclass Array in JavaScript and override 'length' getter and setter?
I am trying to subclass JavaScript array and override 'length' getter and setter. This code is not working - it outputs nothing to the console because getter and setter are not called. How to fix this? class MyArray extends Array…