Configurable Joint in Script

Hey guys.

How do I access a GameObject’s configurable Join?! I looked around the forum for answers(couldn’t find anything that helps me) but I did notice that it’s different in script than any other joint. that’s a piece of my code:

var CJ : ConfigurableJoint;
CJ.GetComponent(ConfigurableJoint);

function Update()
{
     CJ.anchor=hit.point; //"hit.point" is a Vector3 type variable.
}

but it keeps showing me the following error: The variable CJ of ‘Script’ has not been assigned.

Only 2 years late, but I just stumbled on this.
I think what you may be looking for is:

var CJ : ConfigurableJoint;
        CJ = this.GetComponent(ConfigurableJoint);
         
        function Update()
        {
        CJ.targetPosition = hit.point; //"hit.point" is a Vector3 type variable.
        }