DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Charlotte Fereday
Charlotte Fereday

Posted on

Visualising documentation: JavaScript array.map

Alt Text

Today’s function is array.map(), mdn description here.

Map applies the function it's given to every element in the array, and returns a new array with each transformed element inside it.

It's interesting to consider when to use map vs other core functions that could have the same effect, for example array.from(). Would welcome comments on trade offs.

I've done my own version of the docs with sketches together. Here’s the folder for array.map. Check out the readme to see how you can run the examples.

Top comments (0)

Stop sifting through your feed.

Find the content you want to see.

Change your feed algorithm by adjusting your experience level and give weights to the tags you follow.