code: function repeatString(string, nb) {
      var s = string,
          l,
          i;
  
      if (nb <= 0)
        return '';
  
      for (i = 1, l = nb | 0; i < l; i++)
        s += string;
      return s;
    }
docs: Creating repeating sequences