[android-components](../../index.md) / [mozilla.components.support.ktx.android.view](../index.md) / [android.view.ViewGroup](index.md) / [forEach](./for-each.md)

# forEach

`fun `[`ViewGroup`](https://developer.android.com/reference/android/view/ViewGroup.html)`.forEach(action: (`[`View`](https://developer.android.com/reference/android/view/View.html)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/ViewGroup.kt#L13)

Performs the given action on each View in this ViewGroup.

