JavaScript

$u.s.replicate Function

Syntax

$u.s.replicate(str as string, repeat as number)

Arguments

strstring

The string to duplicate.

repeatnumber

The number of times to duplicate the string.

Description

Duplicate a string a given number of times.

Example

var str = 'bye';
str = $u.s.replicate(str,4);
/* result is: 'byebyebyebye'*/