Creates a string that contains the passed string repeated a specified number of times.

Syntax

JSV_replicate(expS, expN)

Prototype

expS.replicate(expN)

Returns

Returns a character string that contains the specified character expression expS repeated the specified number of times indicated in expN.

Parameters

The replicate function uses the following arguments.

Argument Description
expS The character expression that is replicated.
expN The number of times the character expression expS is replicated.

Remarks

n/a

Dependencies

JSV_isEmpty

Example

The following lines of code

var testString = "Blah ";
document.write( JSV_replicate(testString, 12)  );

produce