function functionName(element:*, index:int, array:Array):void
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var subjects:Array = ["Art", "Science", "Math", "History"];
subjects.forEach(traceArray);
}
function traceArray(element:*, index:int, a:Array):void {
trace("["+ index + "] = "+ element);
}
}
}