Visualising documentation: JavaScript array.from

Charlotte Fereday - Aug 28 '20 - - Dev Community

Alt Text

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

This function creates an array from whatever it has been given.

For example, if you give it a string it will split the string into chars and build an array from that. You could also give it an existing array and a function, and it will create a new array from the results of applying the function to each item in the original array.

For this second use case, it's interesting to consider when to use array.from() vs array.map(). Would welcome any comments :)

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

. . . . . . . . .
Terabox Video Player