🌍 Public
Viewing a saved revision (read-only)
88e1f0b89f0844469d8ed5472e99f87c
Map function javascript
This example demonstrates the JavaScript `Array.prototype.map` function by squaring the values in a fixed array `[10, 20]` and rendering the resulting numbers as a large, centered text message. The React component `App` calls `array.map` twice, first to square each element and then to square the result again, producing the values 10000 and 40000. The application uses React 16.10 via production UMD builds, with the output displayed inside the `#root` element. The background color is applied through CSS in the HTML file, and the console logs the intermediate squared values.
AI-generated descriptionReact Starter code.