{"version":"1.0","type":"rich","title":"Sample problems 3: objects and arrays","description":"This example presents four JavaScript practice problems focused on working with objects and arrays, using a small dataset of U.S. states with their names, abbreviations, and populations. The page displays a title and instructions, but all computation happens in the browser’s developer console. Problem 1 uses `d3.mean()` to calculate and log the average population, while Problem 2 attempts the same calculation manually using `forEach()`, though the code’s logic is flawed. The visualization relies solely on D3 v4 for the mean function, with no SVG or graphical output.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-916999c3c8a1481bd8616492ca7f0fc2?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}