repeat()
Learn how to use the repeat() function to generate a dynamic array containing a series comprised of repeated numbers.
Generates a dynamic array containing a series comprised of repeated numbers.
Syntax
repeat(value, count)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| value | bool, int, long, real, datetime, string or timespan | ✔️ | The value of the element in the resulting array. |
| count | int | ✔️ | The count of the elements in the resulting array. |
Returns
If count is equal to zero, an empty array is returned. If count is less than zero, a null value is returned.
Examples
The following example returns [1, 1, 1]:
T | extend r = repeat(1, 3)
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.