Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 409 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 409 Bytes

flattenarray

Flatten nested arrays, a job application exercise

To see it work,

git clone https://github.com/eschiebel/flattenarray.git
cd flattenarray
npm install
npm test

There are two implementations

  • flattenarray.js uses Array.reduce
  • flattenarray2.js is all hand-crafted

You can pick which one to run by commenting out the appropriate line near the top of test/flattenarray-tests.js