Skip to main content
100%

This is so cool "Map function inside Map function"

✓ Published1🌍 Public
NNita
Last edited Feb 25, 2020
Created on Feb 25, 2020

This example visualizes a grid of randomly positioned circles, where each circle’s placement and color are derived from nested `map` functions iterating over an array of integers from 0 to 100. Using React and ReactDOM, the SVG canvas (960x500) renders over 10,000 circles with varying radii, fill colors (based on RGB values from the loop index), and opacity. The code relies on React’s JSX syntax inside `index.js`, with SVG elements generated dynamically via nested `A.map()` calls, producing an emergent, colorful scatter pattern. The rendering is static, using no external libraries beyond React and React’s DOM bindings.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes