Instantiate a random number of one Prefab

I have been looking all over for the answer to this, I know how to create a random int, but for some reason i can't work out how to use that to insatiate a random number of the same prefab.

var grass : GameObject;

function Start() {
     var grassNum = Random.Range(0, 10);
     Instantiate(grass[grassNum],transform.position, Quaternion.identity);
}

If I understand this correctly, you want to instantiate `grassNum` instances of the `grass` prefab? If so you'll have to use a for loop (that article is for C#, but in UnityScript it works the same).

var grass : GameObject;   // your prefab

function Start() {
    var grassNum = Random.Range(0, 10);   // this will return a number between 0 and 9
    for (var i = 0; i < grassNum; i++)
        Instantiate(grass, transform.position, Quaternion.identity);
}