$24
Write a function that flattens nested arrays to a single array.
This function must work to any depth, and support ragged arrays.
This function must use the reduce Array method internally.
So
flatten([[1,2,3],[9,5,[8,7]]]) would return
[1,2,3,9,5,8,7]
For this exercise, you are allowed to use any resource you wish as long as you give the source. (for example, stack overflow)
Hand in you listing, and at least 3 tests (input and output).
You can use chalk and chrome, just chrome, or node, or any other JavaScript system.
Use
http://ku-fpg.github.io/workbook/EECS_368/ To generate the cover sheet.