function createProxy() { const myArray = [Math.random(), Math.random()]; return new Proxy(myArray, {}); } const myProxy = createProxy();
H
As the proxy contain an object you can also do
Object.keys( my_proxy )
And then it become easy to retrieve thing such as Object.keys( my_proxy ).length
Object.keys( my_proxy ).length