how to pass an int to a function by reference in Javascript ? (as an InOut parameter)

I've got this function:

static function GetSpawnPos (prevSpawn:int, y:float) : Vector3
{
    //stuff happens here
    //I read prevSpawn and change it's value sometimes
}

I want prevSpawn integer to be passed by reference, so that the original integer that is passed to this function is modified when I modify prevSpawn.

How do I do this in Javscript ? (cause I can't seem to find how to declare an int pointer)

As far as I know, this never became possible. Wrap it in a class or switch to C#.

http://forum.unity3d.com/threads/4213-Javascript-Reference-Variables