Clone a Prefab

So i got a ball that i want to spawn at it’s position every 0.7 second.
what i need it for?
im making a game where tha ball spawn and you are suppost to balance it on a board down
to a bucket when it collides with the bucket it gives you one score and under the bucket there is a box collider that destroys the ball but this is already done i just need a
script to clone a prefab.

I need it in js

maybe something like this:

var ObjectToClone : GameObject; //add this script to your ball.
var TimeToSpawn : float = 0.7;

function Update () {
SpawnBall();
}

function SpawnBall() {
yield WaitForSeconds(TimeToSpawn);
Instantiate(ObjectToClone,transform.position,Quaternion.identity);
}