{"version":"1.0","type":"rich","title":"Treasure Chest - Private Class Features","description":"This example demonstrates JavaScript’s private class features using a `TreasureChest` class. It shows how to encapsulate properties like `#bronze`, `#silver`, and `#gold` with methods such as `addBronze`, `getGold`, and `getLoot`, while a private static `#shuffle` method randomly selects loot types and amounts. The code relies on native ECMAScript class syntax and the `Object.assign` method for merging options. All interaction happens in the browser console, where the user can instantiate the class and call its public methods.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-6961e4c59abc37c23538781f3122e44f?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}