Sample problems 2: objects and arrays
This example presents four JavaScript practice problems that operate on arrays and objects, demonstrating data filtering, comparison, and sorting without any visual rendering. The code uses plain JavaScript methods such as `forEach`, `includes`, and `sort` to manipulate datasets like state objects with names, locations, and populations, and arrays of characters and numbers. It logs results to the browser’s developer console, including filtering states by location substrings, finding items unique to one array, sorting states alphabetically, and identifying even population values. The visualization relies entirely on the console output rather than D3 or SVG, though it is built within a D3 v4 environment.
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>