title: How does one consolidate multi-dimensional arrays?
body: <p>I am trying to get one array with a complete string:</p>
  <p>['...']</p>
  <p>Given:</p>
  <p>Array1 = ['...', ['...'], ['...', 2, 'x']]</p>
  <p>This should handle any size array*</p>
  <p>Define a function, <code>zooInventory</code>, that accepts a multi-dimensional array of
  animal facts.</p>
  <p><code>zooInventory</code> should return a new, flat array. Each element in the new array
  should be a sentence about each of the animals in the zoo.</p>
  <p>What I have currently:</p>
  <pre><code>const zooInventory = array =&gt; {
      let finalArray = [];
    for (let i = 0; i &lt; array.length; i++) {
        let currentElement = array[i];
       if (!(Array.isArray(currentElement))) {
           finalArray.push(currentElement);
       } else {
           zooInventory(currentElement);
  // I thought I could push the currentElement back to beginning to handle additional arrays 
       }
      }
    return finalArray;
  }
  
  </code></pre>
  <p>Where my heads at:</p>
  <p>I thought I could get away with having it push(...array) in the else statement.</p>
  <p>My batman belt contains beginner methods... slice, splice, spread.</p>
  <p>What method would be best practice?</p>