Sample problems 2: objects and arrays
This example presents four JavaScript practice problems focused on array and object manipulation, with output shown only in the browser’s developer console. It demonstrates techniques such as iterating with `forEach()`, filtering array elements using `includes()` for substring matching and set difference, sorting an array of objects by a string property with a custom comparator, and checking numeric properties with the modulo operator. The code uses the D3.js v4 library for loading, but the exercises themselves rely on core JavaScript APIs, including `console.log()`, and include sample datasets of U.S. states with their regions and populations.
AI-generated descriptionBuilt with blockbuilder.org
forked from <a href='http://bl.ocks.org/scresawn/'>scresawn</a>'s block: <a href='http://bl.ocks.org/scresawn/ad5f8f49f1364e79ea5550b55f7933a5'>Sample problems: objects and arrays</a>
forked from <a href='http://bl.ocks.org/scresawn/'>scresawn</a>'s block: <a href='http://bl.ocks.org/scresawn/3197a1fbb07bd07717ef05675c9e7396'>Sample problems 2: objects and arrays</a>
forked from <a href='http://bl.ocks.org/eamonm95/'>eamonm95</a>'s block: <a href='http://bl.ocks.org/eamonm95/701994cd22252e6dd701cb23aed903ec'>Sample problems 2: objects and arrays</a>