code: function getNewName(array, prefix) {
          var num = 0, name = null;
          do {
              num++;
              name = prefix + num;
          } while (findByName(array, name));
          return name;
      }
docs: Find an available name in a given array. (e.g. Class1, Class2, ... )
  
  @param {Array.<Element>} array
  @param {string} prefix Prefix for name
  @return {string} Return a new name