Skip to content

repeat

repeat(string, n) → string · String

Repeat a string n times.

  • string (required): the string to repeat

  • n (required): number of repetitions

utlx
repeat("ab", 3)                          // "ababab"
repeat("-", 40)                          // "----------------------------------------"

Released under AGPL-3.0.