How to use ForEach function in UnityScript

I want to init several Textures by using ForEach method in UnityScript like this.

public var cards = {};

function InitCards() {
  [0,1,2,3,4,5,6,7,8,9].ForEach(function(val) {
    cards['card'+val.ToString()] = Resources.Load('card'+val.ToString(), Texture2D);

But this code ends up with error:

Cannot infer generic arguments for method ‘System.Array.ForEach.(T, function(T): void)’. Provide stronger type information through arguments, or explicitly state the generic arguments.

How can I fix this error?

This Should Help You …

function Start () 
    var strings = ["First string", "Second string", "Third string"];
    for(var item : String in strings)
        print (item);

How to Loop in Unity