Repeating scripts

Hi, does anyone know how to repeat a part of a script some amount of times in the same frame? This is the script:

var bits : Rigidbody;
var velocity : float = 20;
var up : float = 200;
function Start () {
    InvokeRepeating("go",.5,.5);
}

function go () {
    var copy = Instantiate(bits,transform.position,Random.rotation);
    var random1 = Random.Range(-velocity, velocity);
    var random2 = Random.Range(-velocity, velocity);
    var random3 = Random.Range(-velocity, velocity);

    copy.rigidbody.velocity = transform.TransformDirection(random1,up,random3);

}

Use a `for` loop:

for (i = 0; i < x; i++) {
    // do stuff you want repeated here
}

where x is the number of times you want to repeat.

http://www.w3schools.com/js/default.asp

helped me get started with javascript (: