asIterable
Creates an Iterable instance that wraps the original array returning its elements when being iterated.
fun <T> Array<out T>.asIterable(): Iterable<T>(source)
val words = arrayOf("kotlin", "java", "swift", "python")
for (word in words.asIterable()) {
println(word)
}