Skip to content

cotrForEachLoop

Iterates over an iterable object

Aliases:

  • cotrForEachLoop
  • forEach
  • cotrForIn
  • forLoop
  • cotrForLoop

csharp

foreach (Type item in iterable) {
// Your code here
}

haskell

forM iterable \item -> do
-- Your code here

java

for (Type item : iterable) {
// Your code here
}

php

foreach iterable asitem) {
// Your code here
}

powershell

Terminal window
foreach item in iterable) {
# Your code here
}

r

for (item in iterable) {
# Your code here
}

scala

for (item <- iterable) {
// Your code here
}