DEV Community

Charlotte Fereday
Charlotte Fereday

Posted on

Visualising documentation: JavaScript array.flat

Alt Text

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

Flat takes a nested array and smooshes it into a new single level 'flat' array. If there are empty slots anywhere in the array, it will remove those too.

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

Top comments (2)

Collapse
 
nyxtom profile image
Tom Holloway 🏕

Comics / Visuals are great! Keep it up :D Would love to see this in a published book someday

Collapse
 
charlottebrf_99 profile image
Charlotte Fereday

Thanks for the kind words, much appreciated! Trying to get better at technical sketching & also give a bit of an alternative to the wordy docs for any other visual learners.