foreach<functionName>(__iterable);

function functionName(__value) {}

Description

Call a function for each element of an iterable, ignoring the return value of the function.

The function argument should be a function accepting a single argument.

When the argument to foreach is an OBJECT, the function will be passed an OBJECT with a single key-value pair.  

Example  

  

use System;

var inputs = [1,2,3,4,5,6,7,8,9,10];
foreach<print>(inputs); 

function print(num) {
    System.print(num);
}