instantiate. Code Problem. Help.

Hello guys im trying to create my first game 2D but i face some troubles…
I have made 3 prefabs of 1)small ground 2)medium ground 3)big ground
i have set my player to move to the right with some speed and the purpose of the game is to jump at these ground and try to make the best time without to fall out of them… like a jetpack…

now i want my smallground to instantiate it and as the player moves i want more grounds to generate automatically in random range… so far i wrote this code… but the problem with this code is that it generates only 1 small ground at random range and not lot of them …
my code:

#pragma strict

var smallG: Transform;

function Start () {

var position: Vector3 = Vector3(Random.Range(-10.0,10.0),0,Random.Range(-10.0,
``10.0);
Instantiate(smallG, position, Quaternion.identity);
}

function Update () {

}

what i have to add so to create gorunds all the time?
and second question i made the idea for this code from the scripting reference… but i dont know why i put the code in the start method and not to the update method?

Start is called once, when the script is first activated. So you are only going to Instantiate one object. You need to have a spawn function that you call in Start, then have the spawn funciton call itself after a specified amount of time.

#pragma strict
var smallG: Transform;

function Start () {

    //Call the spawn function when the level is loaded.
    Spawn();
}

function Update () 
{
}

//The spawn function will instantiate your object
function Spawn()
{
    var position: Vector3 = Vector3(Random.Range(-10.0,10.0),0,Random.Range(-10.0,10.0);
    Instantiate(smallG,position, Quaternion.identity); 

    Invoke("Spawn",5);

}