intArrayOf

fun intArrayOf(range: IntRange): IntArray

Return an integer Array from int range.

Example:

intArrayOf(1..10) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Since

1.1.0

See also

IntArray
IntRange

fun intArrayOf(progression: IntProgression): IntArray

Return an integer Array from int progression.

Example:

intArrayOf(1..10 step 2) // [1, 3, 5, 7, 9]

Since

1.1.0

See also

IntArray
IntProgression