code: function flatten(array) {
          return array.reduce(function (a, b) {
              return isArray(b) ? a.concat(flatten(b)) : a.concat(b);
          }, []);
      }
docs: Flattens a nested array.
  @param {!Array} array the array to flatten
  @returns {Array} the new flattened array