Choose where you’d like to start

Repeat()

Overview

The repeat() function returns a text with the input text repeated for the specified number of times.

Note: The size of each input and output parameter of this function can individually be up to 100K characters.

Return Type

  • TEXT

Syntax

<variable> = <inputText>.repeat(<repeatCount>);

(OR)

<variable> = repeat(<inputText>, <repeatCount>);
ParameterData typeDescription
<variable>TEXTVariable which will contain the returned text.
<inputText>TEXTThe text that will be repeated for the specified number of times
<repeatCount>NUMBER
The number of times the inputText will be repeated.

Example 

The following example returns a text with the input text - Zoho repeated for 3 times. 

 inputText = "Zoho";  
 outputText = inputText.repeat(3);  
 info outputText; // Returns ZohoZohoZoho 

Related Links

Get Started Now

Execute