Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

"Map function inside Map function"

Public visualization

"Map function inside Map function"

0 stars0🌍 Public
NNita
Last edited Feb 26, 2020
Created on Feb 25, 2020

This example shows a grid of colored squares scattered across an SVG canvas, with each square’s position and color determined by nested JavaScript `map` functions over an array of integers from 0 to 100. The inner `map` iterates over the same array inside the outer `map`, generating a square for each combination of coordinates, with random placement and RGB fill values derived from the loop index. Built with React and ReactDOM, the visualization uses SVG `<rect>` elements, with rendering handled via the production React build.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed