code: function flattenToString(arr) {
          var i, iz, elem, result = '';
          for (i = 0, iz = arr.length; i < iz; ++i) {
              elem = arr[i];
              result += isArray(elem) ? flattenToString(elem) : elem;
          }
          return result;
      }
docs: flatten an array to a string, where the array can contain
  either strings or nested arrays