/flattenArray

Example code that flattens a deeply nested array

Primary LanguageJavaScript

This Repository contains example JavaScript code that flattens a deeply nested array of numbers. Thorough unit tests are included, as is a karma setup for running them.

This repo was created as part of a job application.

Note to evaluators: Although a gist was requested, demonstrating functioning unit tests required a more complex setup than could be communicated that way. Therefore I created a whole repository instead.

Usage

First run npm install to install dependencies.

Then, to exercise the code, run npm test.

This code was tested using npm 3.3.12 and node 5.3.0.