{"version":"1.0","type":"rich","title":"ES6 Proxy magic for arrays","description":"This example demonstrates how a plain JavaScript object with numeric keys and a `length` property can be made to behave like a real array. It uses an ES6 `Proxy` to intercept property access and assignment, delegating missing methods to `Array.prototype` and automatically updating the `length` value. The code explicitly handles length changes by deleting excess properties and adjusting the stored length. The demonstration uses the `emulateArray` function from the gist to wrap a simple three-element object, showing array-like behavior without subclassing `Array`.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-c0562958b112ae7fcccd?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}