Skip to content

REPT

Repeats the input string a specified number of times.

js
REPT(input_string, repeat_count)

Parameters

  • input_string - The string to repeat.
  • repeat_count - The number of times to repeat the string.

Examples

js
REPT("*", 5)

Result: *****

js
REPT("ab", 3)

Result: ababab