SplitScript reference / [T] / iterator

[T].iterator

Method

[T].iterator() -> ArrayIterator<T>

Creates an independent cursor over this array.

The cursor initially points at index zero and captures the array's structural version.

Effects: allocates

Runtime behavior: available everywhere; synchronous

Examples

Iterate manually

let iterator = ["forest", "castle"].iterator()