Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Iterate through the array, apply the callback to each element with (value, index, array) arguments, and push each transformed result into a new array. The original array is never modified, preserving immutability.
Map creates a 1:1 transformation: every input element produces exactly one output element. The callback receives the current value, index, and original array, matching the native Array.prototype.map signature.
Updated Feb 2026