@Repeat()
New in 2.0Generate an array by repeating a value N times
ArraySince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| value | String | ✓ | — | The value to repeat |
| count | Integer | — | 1 | Number of repetitions, default 1 |
Usage
@Repeat(value)Repeat a value once
Example:
@Repeat(hello)
Output:
["hello"]@Repeat(value,count)Repeat a value N times
Example:
@Repeat(hello,3)
Output:
["hello","hello","hello"]