Function repeat

  • It will repeat the given string, by count times.

    Parameters

    • string: string
    • count: number

    Returns string

    Since

    1.0.0

    Example

    repeat("*", 3);
    // => "***"

    Example

    repeat("abc", 2);
    // => "abcabc"

    Example

    repeat("abc", 0);
    // => ""