Flatten arrays in JavaScript

Published --