Skip to main content
100%

Sample problems 2: objects and arrays

✓ Published0🌍 Public
LLaurynKW
Last edited Mar 1, 2018
Created on Feb 27, 2018

This example demonstrates four JavaScript practice problems for working with objects and arrays. The code uses a hardcoded array of state objects and a pair of simple arrays to test filtering, comparison, and sorting logic. It relies on the base JavaScript array methods `forEach`, `includes`, and `sort`, along with the d3 `ascending` comparator. All output is printed to the browser’s developer console using `console.log`, as the visualization itself displays only a static heading and instructions.

AI-generated description

Built 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>

mit Licensed

Similar vizzes