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

# forEach

`inline fun <ERROR CLASS>.~~forEach~~(action: (<ERROR CLASS>) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): <ERROR CLASS>` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/ViewGroup.kt#L16)
**Deprecated:** Use Android KTX instead

Performs the given action on each View in this ViewGroup.

