Flattening

Flattening streams

Flattening arrays

You may have heard of a flatten function.

flatten functions take an input of some sort and “unwrap” it. (In this case, unwrapping an array is to pull out the elements in the array and use those.)

This hypothetical code snippet returns [2, 4, 7, 12]:

 ...
Access this course and 1400+ top-rated courses and projects.